brd: make symbol rd_size static
Subsystems (2)
PATCH 1/1 brd: make symbol rd_size static
From: Wei Yongjun <[email protected]>
Fixes the following sparse warning:
drivers/block/brd.c:411:15: warning:
symbol 'rd_size' was not declared. Should it be static?
--- drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/brd.c +1 -1
@@ -408,7 +408,7 @@ static int rd_nr = CONFIG_BLK_DEV_RAM_COUNT;module_param (rd_nr, int,S_IRUGO );MODULE_PARM_DESC (rd_nr,"Maximum number of brd devices" ); -unsigned long rd_size =CONFIG_BLK_DEV_RAM_SIZE ; +static unsigned long rd_size =CONFIG_BLK_DEV_RAM_SIZE ;module_param (rd_size, ulong,S_IRUGO );MODULE_PARM_DESC (rd_size,"Size of each RAM disk in kbytes." );
Jens Axboe
maintainerQuoted 6 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fixes the following sparse warning:
drivers/block/brd.c:411:15: warning:
symbol 'rd_size' was not declared. Should it be static?
We just tried this, it's used in arm:
arch/arm/kernel/atags_parse.c
static int __init parse_tag_ramdisk(const struct tag *tag)
{
extern int rd_size, rd_image_start, rd_prompt, rd_doload;[...]
Signature · 1 line
Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 6 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fixes the following sparse warning:
drivers/block/brd.c:411:15: warning:
symbol 'rd_size' was not declared. Should it be static?
Quoted 9 lines
We just tried this, it's used in arm:
arch/arm/kernel/atags_parse.cstatic int
__initparse_tag_ramdisk(const struct tag *tag){ extern int rd_size, rd_image_start, rd_prompt, rd_doload;[...]
Oh, yeah, got it.
Thank you very much.
Regards,
Yongjun Wei
Quoted 6 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fixes the following sparse warning:
drivers/block/brd.c:411:15: warning:
symbol 'rd_size' was not declared. Should it be static?
It should not. It is used in arch/arm/.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR