Message ID | 1350027693-19528-2-git-send-email-u.kleine-koenig@pengutronix.de |
---|---|
State | New, archived |
Headers | show |
On Fri, Oct 12, 2012 at 3:41 AM, Uwe Kleine-König wrote: > 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. Acked-by: Mike Frysinger <vapier@gentoo.org> -mike
On 12/10/12 17:41, Uwe Kleine-König wrote: > 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. > > Signed-off-by: Uwe Kleine-K÷nig <u.kleine-koenig@pengutronix.de> Acked-by: Greg Ungerer <gerg@uclinux.org> > --- > Hello, > > it's a bit exaggerated to claim that sparse is happy now, but at least > we have one warning less :-) > > Uwe > drivers/mtd/maps/uclinux.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c > index f5e8e9a..18cf6d0 100644 > --- a/drivers/mtd/maps/uclinux.c > +++ b/drivers/mtd/maps/uclinux.c > @@ -23,6 +23,12 @@ > > /****************************************************************************/ > > +/* > + * 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 = { > .size = 0, > }; >
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index f5e8e9a..18cf6d0 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -23,6 +23,12 @@ /****************************************************************************/ +/* + * 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 = { .size = 0, };
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. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- Hello, it's a bit exaggerated to claim that sparse is happy now, but at least we have one warning less :-) Uwe drivers/mtd/maps/uclinux.c | 6 ++++++ 1 file changed, 6 insertions(+)