[PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable

Artem Bityutskiy dedekind1 at gmail.com
Mon Nov 29 09:51:27 EST 2010


On Tue, 2010-11-23 at 17:02 -0200, Fabio Estevam wrote:
> If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated:
> 
>   CC      drivers/mtd/nand/mxc_nand.o
> drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
> drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'
> 
> Fix it by marking nr_parts as __maybe_unused.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>

I'm curious, do you really use MTD without CONFIG_MTD_PARTITIONS ? Or
you found just random warning? I'm asking because I believed this config
option has to be killed, because it causes more harm in form of mess,
than good.

Anyway, putting this to my l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list