Skip to contentSkip to conversation

brd: make symbol rd_size static

PATCH In review Wei Yongjun 3 participants 4 messages Oct 29, 2016 – Oct 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index ad793f3..d1edf42 100644
@@ -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.");
maintainer
#1 lore raw
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?

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
#2 lore raw
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.c

static int __init parse_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