Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Uwe Kleine-König and committed by
Artem Bityutskiy
44fe63fc 81f53ff8

+6
+6
drivers/mtd/maps/uclinux.c
··· 29 29 #define MAP_NAME "ram" 30 30 #endif 31 31 32 + /* 33 + * Blackfin uses uclinux_ram_map during startup, so it must not be static. 34 + * Provide a dummy declaration to make sparse happy. 35 + */ 36 + extern struct map_info uclinux_ram_map; 37 + 32 38 struct map_info uclinux_ram_map = { 33 39 .name = MAP_NAME, 34 40 .size = 0,