ARM: fix rd_size declaration
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 10 Jul 2017 22:51:10 +0000 (15:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jul 2017 23:32:34 +0000 (16:32 -0700)
The global variable 'rd_size' is declared as 'int' in source file
arch/arm/kernel/atags_parse.c and as 'unsigned long' in
drivers/block/brd.c.  Fix this inconsistency.

Additionally, remove the declarations of rd_image_start, rd_prompt and
rd_doload from parse_tag_ramdisk() since these duplicate existing
declarations in <linux/initrd.h>.

Link: http://lkml.kernel.org/r/20170627065024.12347-1-bart.vanassche@wdc.com
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Jason Yan <yanaijie@huawei.com>
Cc: Zhaohongjiang <zhaohongjiang@huawei.com>
Cc: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/kernel/atags_parse.c
drivers/block/brd.c
include/linux/initrd.h

index 68c6ae0b9e4ca0f2e64aaadc1d9865708de93655..98fbfd235ac875662c6666abfad5c53fbd93b1df 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/initrd.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/root_dev.h>
@@ -91,8 +92,6 @@ __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
 #ifdef CONFIG_BLK_DEV_RAM
 static int __init parse_tag_ramdisk(const struct tag *tag)
 {
-       extern int rd_size, rd_image_start, rd_prompt, rd_doload;
-
        rd_image_start = tag->u.ramdisk.start;
        rd_doload = (tag->u.ramdisk.flags & 1) == 0;
        rd_prompt = (tag->u.ramdisk.flags & 2) == 0;
index 17723fd50a53b0016b0cb90bf039257fd01a04aa..104b71c0490dd0cf377c0bc7d138c0c226fc02c9 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/initrd.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/major.h>
index 55289d261b4faffd928039bc997bc2780705c182..bc67b767f9ce5a59c62a0b8e3321525d9ff0c63e 100644 (file)
@@ -10,6 +10,9 @@ extern int rd_prompt;
 /* starting block # of image */
 extern int rd_image_start;
 
+/* size of a single RAM disk */
+extern unsigned long rd_size;
+
 /* 1 if it is not an error if initrd_start < memory_start */
 extern int initrd_below_start_ok;