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

Brian Norris
2014-01-03T01:21:39Z

On Thu, Jan 2, 2014 at 5:17 PM, Brian Norris
<computersforpeace@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