From: Uwe Kleine-König Date: Wed, 16 Jan 2013 14:36:56 +0000 (+0100) Subject: mtd: uclinux: add a comment about why uclinux_ram_map must not be static X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=44fe63fc0fcbfef65b5a8c015abb4dbbbcc90f23;p=linux-beck.git mtd: uclinux: add a comment about why uclinux_ram_map must not be static I was (at least) the second person trying to fix a warning by sparse, so document in the code why this is a bad idea and add an extern declaration to make sparse happy. Signed-off-by: Uwe Kleine-König Acked-by: Mike Frysinger Acked-by: Greg Ungerer Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index f56d0aa4404b..c1af83db5202 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -29,6 +29,12 @@ #define MAP_NAME "ram" #endif +/* + * Blackfin uses uclinux_ram_map during startup, so it must not be static. + * Provide a dummy declaration to make sparse happy. + */ +extern struct map_info uclinux_ram_map; + struct map_info uclinux_ram_map = { .name = MAP_NAME, .size = 0,