[PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable
fabio.estevam at freescale.com
Mon Nov 29 10:10:06 EST 2010
On 11/29/2010 12:51 PM, Artem Bityutskiy wrote:
> 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.
I was using it without CONFIG_MTD_PARTITIONS because first I was trying
to get the NAND to be detected only.
> Anyway, putting this to my l2-mtd-2.6.git, thanks.
More information about the linux-mtd