Re: [PATCH] mtd: nand: gpio: Remove unneeded CONFIG_OF

Ezequiel Garcia
2013-12-07T15:40:57Z

On Sat, Dec 07, 2013 at 07:35:49PM +0400, Alexander Shiyan wrote:
> > On Sat, Dec 07, 2013 at 06:54:32PM +0400, Alexander Shiyan wrote:
> > > Hello.
> > >
> > > > Since the of_mtd header provides dummy stubs for !CONFIG_OF, it's safe
> > > > to remove the #ifdef CONFIG_OF. Build tested only.
> > > >
> > > > Cc: Alexander Shiyan <shc_work@mail.ru>
> > > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > > ...
> > > > -#ifdef CONFIG_OF
> > > > static const struct of_device_id gpio_nand_id_table[] = {
> > >
> > > You should add "__maybe_unused" attribute here in this case.
> > > This will avoid warning when you build driver without OF.
> > >
> > > ---
> >
> > I don't get such warning, maybe because the GCC is smart enough
> > to remove the symbol?
> >
> > Actually, I realise now we don't need to of_match_ptr, so let
> > me push a v2.
>
> And without of_match_ptr() we do not need to define "__maybe_unused" for this :)
>

Yup :-)

Care to give the v2 a test? I've just submitted it.

Thanks!
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering