diff options
author | Baoyou Xie <baoyou.xie@linaro.org> | 2017-08-29 04:20:36 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-29 17:34:44 -0400 |
commit | 1ffa7bfab40a4f3b47ee9ddd95fdef0f7f6744b8 (patch) | |
tree | 29944c18d490ed913e3a204adcbec828855c10d4 | |
parent | e1fbc4ca9d0353a932994cb1ac38e87e5a211a9f (diff) |
drbd: mark symbols static where possible
We get a few warnings when building kernel with W=1:
drbd/drbd_receiver.c:1224:6: warning: no previous prototype for 'one_flush_endio' [-Wmissing-prototypes]
drbd/drbd_req.c:1450:6: warning: no previous prototype for 'send_and_submit_pending' [-Wmissing-prototypes]
drbd/drbd_main.c:924:6: warning: no previous prototype for 'assign_p_sizes_qlim' [-Wmissing-prototypes]
....
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index a3b2ee74bba9..11f3852ebea3 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -923,7 +923,9 @@ void drbd_gen_and_send_sync_uuid(struct drbd_peer_device *peer_device) | |||
923 | } | 923 | } |
924 | 924 | ||
925 | /* communicated if (agreed_features & DRBD_FF_WSAME) */ | 925 | /* communicated if (agreed_features & DRBD_FF_WSAME) */ |
926 | void assign_p_sizes_qlim(struct drbd_device *device, struct p_sizes *p, struct request_queue *q) | 926 | static void |
927 | assign_p_sizes_qlim(struct drbd_device *device, struct p_sizes *p, | ||
928 | struct request_queue *q) | ||
927 | { | 929 | { |
928 | if (q) { | 930 | if (q) { |
929 | p->qlim->physical_block_size = cpu_to_be32(queue_physical_block_size(q)); | 931 | p->qlim->physical_block_size = cpu_to_be32(queue_physical_block_size(q)); |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 1b3f439a3b23..248966727bf6 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1261,7 +1261,7 @@ struct one_flush_context { | |||
1261 | struct issue_flush_context *ctx; | 1261 | struct issue_flush_context *ctx; |
1262 | }; | 1262 | }; |
1263 | 1263 | ||
1264 | void one_flush_endio(struct bio *bio) | 1264 | static void one_flush_endio(struct bio *bio) |
1265 | { | 1265 | { |
1266 | struct one_flush_context *octx = bio->bi_private; | 1266 | struct one_flush_context *octx = bio->bi_private; |
1267 | struct drbd_device *device = octx->device; | 1267 | struct drbd_device *device = octx->device; |
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 72cb0bd624a6..e48012df108a 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -203,7 +203,8 @@ void drbd_peer_request_endio(struct bio *bio) | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | void drbd_panic_after_delayed_completion_of_aborted_request(struct drbd_device *device) | 206 | static void |
207 | drbd_panic_after_delayed_completion_of_aborted_request(struct drbd_device *device) | ||
207 | { | 208 | { |
208 | panic("drbd%u %s/%u potential random memory corruption caused by delayed completion of aborted local request\n", | 209 | panic("drbd%u %s/%u potential random memory corruption caused by delayed completion of aborted local request\n", |
209 | device->minor, device->resource->name, device->vnr); | 210 | device->minor, device->resource->name, device->vnr); |