Skip to content

Commit 44fe63f

Browse files
Uwe Kleine-Königdedekind
authored andcommitted
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 <[email protected]> Acked-by: Mike Frysinger <[email protected]> Acked-by: Greg Ungerer <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
1 parent 81f53ff commit 44fe63f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/mtd/maps/uclinux.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#define MAP_NAME "ram"
3030
#endif
3131

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+
3238
struct map_info uclinux_ram_map = {
3339
.name = MAP_NAME,
3440
.size = 0,

0 commit comments

Comments
 (0)