Skip to contentSkip to conversation

blktrace: make function blk_trace_bio_get_cgid() static

PATCH Applied Wang Hai 2 participants 2 messages Sep 7, 2020

Subsystems (2)
lore
Share & tools
lore

Wang Hai

author
#0 lore raw

PATCH 1/1 blktrace: make function blk_trace_bio_get_cgid() static

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.

---
 kernel/trace/blktrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/blktrace.c +1 -1
index 4b3a42fc3b24..c0887f32f647 100644
@@ -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;
 }
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Wang Hai

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.

Signature · 1 line
Jens Axboe