Skip to contentSkip to conversation

block: make blk_timeout_init() static

PATCH Applied Wei Yongjun 2 participants 2 messages Jul 17, 2020 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: make blk_timeout_init() static

The sparse tool complains as follows:

block/blk-timeout.c:93:12: warning:
symbol 'blk_timeout_init' was not declared. Should it be static?

Function blk_timeout_init() is not used outside ofblk-timeout.c, so marks it static.

Fixes 9054650fac24 ("block: relax jiffies rounding for timeouts")
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-timeout.c +1 -1
index 8ab8a82825cd..4c1fc3417460 100644
@@ -90,7 +90,7 @@ EXPORT_SYMBOL_GPL(blk_abort_request);
 
 static unsigned long blk_timeout_mask __read_mostly;
 
-int __init blk_timeout_init(void)
+static int __init blk_timeout_init(void)
 {
 	blk_timeout_mask = roundup_pow_of_two(HZ) - 1;
 	return 0;
maintainer Applied
#1 lore raw
Quoted 7 lines · Wei Yongjun

The sparse tool complains as follows:

block/blk-timeout.c:93:12: warning:
symbol 'blk_timeout_init' was not declared. Should it be static?

Function blk_timeout_init() is not used outside ofblk-timeout.c, so marks it static.

Applied, thanks.

Signature · 1 line
Jens Axboe