]> Pileus Git - ~andy/linux/commitdiff
mtd: uclinux: add a comment about why uclinux_ram_map must not be static
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 16 Jan 2013 14:36:56 +0000 (15:36 +0100)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 4 Feb 2013 07:26:30 +0000 (09:26 +0200)
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 <u.kleine-koenig@pengutronix.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/maps/uclinux.c

index f56d0aa4404b05171fff005f2ad810df5d8b6aa7..c1af83db5202fe46f503b68289fbc06d0ee59828 100644 (file)
 #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,