diff mbox series

[-next] blktrace: make function blk_trace_bio_get_cgid() static

Message ID 20200907140652.9060-1-wanghai38@huawei.com
State New, archived
Headers show
Series [-next] blktrace: make function blk_trace_bio_get_cgid() static | expand

Commit Message

Wang Hai Sept. 7, 2020, 2:06 p.m. UTC
The sparse tool complains as follows:

kernel/trace/blktrace.c:796:5: warning:
 symbol 'blk_trace_bio_get_cgid' was not declared. Should it be static?

This function is not used outside of blktrace.c, so this commit
marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
 kernel/trace/blktrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe Sept. 7, 2020, 7:41 p.m. UTC | #1
On 9/7/20 8:06 AM, Wang Hai wrote:
> The sparse tool complains as follows:
> 
> kernel/trace/blktrace.c:796:5: warning:
>  symbol 'blk_trace_bio_get_cgid' was not declared. Should it be static?
> 
> This function is not used outside of blktrace.c, so this commit
> marks it static.

Applied, thanks.
diff mbox series

Patch

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 4b3a42fc3b24..c0887f32f647 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -793,7 +793,7 @@  static u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
 	return cgroup_id(bio_blkcg(bio)->css.cgroup);
 }
 #else
-u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
+static u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
 {
 	return 0;
 }