소스 검색

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>
Uwe Kleine-König 13 년 전
부모
커밋
44fe63fc0f
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      drivers/mtd/maps/uclinux.c

+ 6 - 0
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,