Skip to content

Commit

Permalink
mtd: uclinux: add a comment about why uclinux_ram_map must not be static
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Artem Bityutskiy committed Feb 4, 2013
1 parent 81f53ff commit 44fe63f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mtd/maps/uclinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 44fe63f

Please sign in to comment.