From a186e47856c7877fa684d75901436c1d35ec35e0 Mon Sep 17 00:00:00 2001 From: Rashika Kheria Date: Thu, 19 Dec 2013 15:06:10 +0530 Subject: [PATCH] drivers: block: Mark the function as static in drbd_worker.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Mark functions drbd_endio_read_sec_final(), drbd_send_barrier(), need_to_send_barrier(), dequeue_work_batch(), dequeue_work_item() and wait_for_work() as static in drbd/drbd_worker.c because they are not used outside this file. This eliminates the following warnings in drbd/drbd_worker.c: drivers/block/drbd/drbd_worker.c:99:6: warning: no previous prototype for ‘drbd_endio_read_sec_final’ [-Wmissing-prototypes] drivers/block/drbd/drbd_worker.c:1276:5: warning: no previous prototype for ‘drbd_send_barrier’ [-Wmissing-prototypes] drivers/block/drbd/drbd_worker.c:1774:6: warning: no previous prototype for ‘need_to_send_barrier’ [-Wmissing-prototypes] drivers/block/drbd/drbd_worker.c:1798:6: warning: no previous prototype for ‘dequeue_work_batch’ [-Wmissing-prototypes] drivers/block/drbd/drbd_worker.c:1806:6: warning: no previous prototype for ‘dequeue_work_item’ [-Wmissing-prototypes] drivers/block/drbd/drbd_worker.c:1815:6: warning: no previous prototype for ‘wait_for_work’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_worker.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 84d3175d493a..62ff92602a68 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -96,7 +96,7 @@ void drbd_md_io_complete(struct bio *bio, int error) /* reads on behalf of the partner, * "submitted" by the receiver */ -void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(local) +static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(local) { unsigned long flags = 0; struct drbd_conf *mdev = peer_req->w.mdev; @@ -1273,7 +1273,7 @@ int w_prev_work_done(struct drbd_work *w, int cancel) * and to be able to wait for them. * See also comment in drbd_adm_attach before drbd_suspend_io. */ -int drbd_send_barrier(struct drbd_tconn *tconn) +static int drbd_send_barrier(struct drbd_tconn *tconn) { struct p_barrier *p; struct drbd_socket *sock; @@ -1771,7 +1771,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) * (because we have not yet seen new requests), we should send the * corresponding barrier now. Must be checked within the same spinlock * that is used to check for new requests. */ -bool need_to_send_barrier(struct drbd_tconn *connection) +static bool need_to_send_barrier(struct drbd_tconn *connection) { if (!connection->send.seen_any_write_yet) return false; @@ -1795,7 +1795,7 @@ bool need_to_send_barrier(struct drbd_tconn *connection) return true; } -bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_list) +static bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_list) { spin_lock_irq(&queue->q_lock); list_splice_init(&queue->q, work_list); @@ -1803,7 +1803,7 @@ bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_li return !list_empty(work_list); } -bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_list) +static bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_list) { spin_lock_irq(&queue->q_lock); if (!list_empty(&queue->q)) @@ -1812,7 +1812,7 @@ bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_lis return !list_empty(work_list); } -void wait_for_work(struct drbd_tconn *connection, struct list_head *work_list) +static void wait_for_work(struct drbd_tconn *connection, struct list_head *work_list) { DEFINE_WAIT(wait); struct net_conf *nc; -- 2.39.5