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

Brian Norris computersforpeace at gmail.com
Thu Jan 2 20:21:17 EST 2014


On Thu, Jan 2, 2014 at 5:17 PM, Brian Norris
<computersforpeace at gmail.com> wrote:
> On Fri, Dec 20, 2013 at 02:04:29PM +0900, Jingoo Han wrote:
>> +     if (IS_ERR(data->io_base))
>> +             return PTR_ERR(data->io_base);
>
> 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.
>
>>
>>       data->chip.priv = &data;
>>       data->mtd.priv = &data->chip;

Sorry, I replied to the v1, but I was actually testing v3. My comments
apply to either version though.

Brian



More information about the linux-mtd mailing list