[PATCH 7/8] mtd: plat_nand: Use devm_*() functions

Brian Norris computersforpeace at gmail.com
Fri Jan 3 13:16:15 EST 2014


On Fri, Jan 03, 2014 at 10:27:53AM +0900, Jingoo Han wrote:
> On Friday, January 03, 2014 10:18 AM, Jingoo Han wrote:

^^^ Huh? It looks like you quoted me, but your mailer says you're
quoting yourself! You might want to fix that :)

> > This gives me a few errors:
> > 
> > drivers/mtd/nand/plat_nand.c: In function 'plat_nand_probe':
> > drivers/mtd/nand/plat_nand.c:61:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-
> > function-declaration]
> > drivers/mtd/nand/plat_nand.c:62:3: error: implicit declaration of function 'PTR_ERR' [-
> > Werror=implicit-function-declaration]
> > make[4]: *** [drivers/mtd/nand/plat_nand.o] Error 1
> > 
> > You probably need to #include <linux/err.h>. I guess you don't
> > compile-test your changes? It would help if you can catch these mistakes
> > before they get to the maintainer.
> 
> Hi Norris,
> 
> I did compile all patches. However, I cannot understand why the build
> error happens.

I guess you were relying on an implicit #include via some other
explicitly-included header, and maybe this implicit inclusion is
different for different ARCHes, so that this only fails to compile under
certain configurations.

> Anyway, I will check it and add '#include <linux/err.h'
> if needed.

Yes, that is the right thing. Standard practice is to explicitly include
any required headers, so that changes in unrelated headers don't break
things.

> Thank you for your comment. :-)
> Happy new year!

Yes, happy 2014!

Brian



More information about the linux-mtd mailing list