Skip to contentSkip to conversation

blk-wbt: Declare local functions static

PATCH In review Bart Van Assche 3 participants 3 messages Jan 23, 2019 – Jan 24, 2019 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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)
      ^~~~~~~~~~~
---
 block/blk-wbt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/blk-wbt.c +2 -2
index f0c56649775f..fd166fbb0f65 100644
@@ -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))
Signature · 1 line
2.20.1.321.g9e740568ce-goog
Reviewed-by on v1 1/1
#1 lore raw

Looks good.

From: [email protected] <[email protected]> on behalf of Bart Van Assche <[email protected]>
Sent: Wednesday, January 23, 2019 11:05 AM
To: Jens Axboe
Cc: [email protected]; 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)
      ^~~~~~~~~~~

---
 block/blk-wbt.c | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
block/blk-wbt.c +0 -0
index f0c56649775f..fd166fbb0f65 100644
@@ -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))

Signature · 1 line
2.20.1.321.g9e740568ce-goog
maintainer
#2 lore raw
In reply to Bart Van Assche
Quoted 11 lines · 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)

Thanks Bart, applied.

Signature · 1 line
Jens Axboe