* [PATCH] blk-wbt: Declare local functions static
@ 2019-01-23 19:05 Bart Van Assche
2019-01-24 3:20 ` Chaitanya Kulkarni
2019-01-24 18:09 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2019-01-23 19:05 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche
This patch avoids that sparse reports the following warnings:
CHECK block/blk-wbt.c
block/blk-wbt.c:600:6: warning: symbol 'wbt_issue' was not declared. Should it be static?
block/blk-wbt.c:620:6: warning: symbol 'wbt_requeue' was not declared. Should it be static?
CC block/blk-wbt.o
block/blk-wbt.c:600:6: warning: no previous prototype for wbt_issue [-Wmissing-prototypes]
void wbt_issue(struct rq_qos *rqos, struct request *rq)
^~~~~~~~~
block/blk-wbt.c:620:6: warning: no previous prototype for wbt_requeue [-Wmissing-prototypes]
void wbt_requeue(struct rq_qos *rqos, struct request *rq)
^~~~~~~~~~~
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-wbt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index f0c56649775f..fd166fbb0f65 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -597,7 +597,7 @@ static void wbt_track(struct rq_qos *rqos, struct request *rq, struct bio *bio)
rq->wbt_flags |= bio_to_wbt_flags(rwb, bio);
}
-void wbt_issue(struct rq_qos *rqos, struct request *rq)
+static void wbt_issue(struct rq_qos *rqos, struct request *rq)
{
struct rq_wb *rwb = RQWB(rqos);
@@ -617,7 +617,7 @@ void wbt_issue(struct rq_qos *rqos, struct request *rq)
}
}
-void wbt_requeue(struct rq_qos *rqos, struct request *rq)
+static void wbt_requeue(struct rq_qos *rqos, struct request *rq)
{
struct rq_wb *rwb = RQWB(rqos);
if (!rwb_enabled(rwb))
--
2.20.1.321.g9e740568ce-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-wbt: Declare local functions static
2019-01-23 19:05 [PATCH] blk-wbt: Declare local functions static Bart Van Assche
@ 2019-01-24 3:20 ` Chaitanya Kulkarni
2019-01-24 18:09 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2019-01-24 3:20 UTC (permalink / raw)
To: Bart Van Assche, Jens Axboe; +Cc: linux-block, Christoph Hellwig
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
From: linux-block-owner@vger.kernel.org <linux-block-owner@vger.kernel.org> on behalf of Bart Van Assche <bvanassche@acm.org>
Sent: Wednesday, January 23, 2019 11:05 AM
To: Jens Axboe
Cc: linux-block@vger.kernel.org; Christoph Hellwig; Bart Van Assche
Subject: [PATCH] blk-wbt: Declare local functions static
This patch avoids that sparse reports the following warnings:
CHECK block/blk-wbt.c
block/blk-wbt.c:600:6: warning: symbol 'wbt_issue' was not declared. Should it be static?
block/blk-wbt.c:620:6: warning: symbol 'wbt_requeue' was not declared. Should it be static?
CC block/blk-wbt.o
block/blk-wbt.c:600:6: warning: no previous prototype for wbt_issue [-Wmissing-prototypes]
void wbt_issue(struct rq_qos *rqos, struct request *rq)
^~~~~~~~~
block/blk-wbt.c:620:6: warning: no previous prototype for wbt_requeue [-Wmissing-prototypes]
void wbt_requeue(struct rq_qos *rqos, struct request *rq)
^~~~~~~~~~~
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-wbt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index f0c56649775f..fd166fbb0f65 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -597,7 +597,7 @@ static void wbt_track(struct rq_qos *rqos, struct request *rq, struct bio *bio)
rq->wbt_flags |= bio_to_wbt_flags(rwb, bio);
}
-void wbt_issue(struct rq_qos *rqos, struct request *rq)
+static void wbt_issue(struct rq_qos *rqos, struct request *rq)
{
struct rq_wb *rwb = RQWB(rqos);
@@ -617,7 +617,7 @@ void wbt_issue(struct rq_qos *rqos, struct request *rq)
}
}
-void wbt_requeue(struct rq_qos *rqos, struct request *rq)
+static void wbt_requeue(struct rq_qos *rqos, struct request *rq)
{
struct rq_wb *rwb = RQWB(rqos);
if (!rwb_enabled(rwb))
--
2.20.1.321.g9e740568ce-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-wbt: Declare local functions static
2019-01-23 19:05 [PATCH] blk-wbt: Declare local functions static Bart Van Assche
2019-01-24 3:20 ` Chaitanya Kulkarni
@ 2019-01-24 18:09 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2019-01-24 18:09 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block, Christoph Hellwig
On 1/23/19 12:05 PM, Bart Van Assche wrote:
> This patch avoids that sparse reports the following warnings:
>
> CHECK block/blk-wbt.c
> block/blk-wbt.c:600:6: warning: symbol 'wbt_issue' was not declared. Should it be static?
> block/blk-wbt.c:620:6: warning: symbol 'wbt_requeue' was not declared. Should it be static?
> CC block/blk-wbt.o
> block/blk-wbt.c:600:6: warning: no previous prototype for wbt_issue [-Wmissing-prototypes]
> void wbt_issue(struct rq_qos *rqos, struct request *rq)
> ^~~~~~~~~
> block/blk-wbt.c:620:6: warning: no previous prototype for wbt_requeue [-Wmissing-prototypes]
> void wbt_requeue(struct rq_qos *rqos, struct request *rq)
Thanks Bart, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-24 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 19:05 [PATCH] blk-wbt: Declare local functions static Bart Van Assche
2019-01-24 3:20 ` Chaitanya Kulkarni
2019-01-24 18:09 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).