Skip to contentSkip to conversation

block: brd: Staticize 'rd_size'

PATCH Jingoo Han 1 participant 1 message Aug 9, 2013

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw
Quoted 10 lines · Jingoo Han

'rd_size' is used only in this file.
Fix the following sparse warning:

drivers/block/brd.c:432:5: warning: symbol 'rd_size' was not declared. Should it be static?

---
 drivers/block/brd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Sorry, please ignore this patch.
It makes link error as below:

arch/arm/kernel/built-in.o: In function `parse_tag_ramdisk':
/home/jin9/mainline/linux-next_130806_sparse/arch/arm/kernel/atags_parse.c:103: undefined reference to `rd_size'

Best regards,
Jingoo Han

Quoted 16 lines
drivers/block/brd.c +1 -2
index 9bf4371..650530ab 100644
@@ -429,7 +429,7 @@ static const struct block_device_operations brd_fops = {
  * And now the modules code and kernel interface.
  */
 static int rd_nr;
-int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
+static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;
 static int max_part;
 static int part_shift;
 module_param(rd_nr, int, S_IRUGO);
--

1.7.10.4