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

Alexander Shiyan shc_work at mail.ru
Sat Dec 7 10:35:49 EST 2013


> 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 :)

---


More information about the linux-mtd mailing list