diff mbox series

[-next] block: make blk_timeout_init() static

Message ID 20200717100002.51739-1-weiyongjun1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] block: make blk_timeout_init() static | expand

Commit Message

Wei Yongjun July 17, 2020, 10 a.m. UTC
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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe July 17, 2020, 1:14 p.m. UTC | #1
On 7/17/20 4:00 AM, Wei Yongjun wrote:
> 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.
diff mbox series

Patch

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 8ab8a82825cd..4c1fc3417460 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -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;