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

Ezequiel Garcia ezequiel.garcia at free-electrons.com
Sat Dec 7 10:40:49 EST 2013


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 at mail.ru>
> > > > Signed-off-by: Ezequiel Garcia <ezequiel.garcia at 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
http://free-electrons.com



More information about the linux-mtd mailing list