[PATCH 2/2] mtd/uclinux: add a comment about why uclinux_ram_map must not be static

Greg Ungerer gerg at snapgear.com
Mon Oct 15 00:15:34 EDT 2012


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 at pengutronix.de>

Acked-by: Greg Ungerer <gerg at 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,
>   };
>


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg at snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com



More information about the linux-mtd mailing list