[PATCH] mtd: nand: add support for Samsung K9LCG08U0B
Brian Norris
computersforpeace at gmail.com
Fri Jan 17 00:41:38 EST 2014
On Thu, Jan 16, 2014 at 5:40 PM, Huang Shijie <b32955 at freescale.com> wrote:
> On Thu, Jan 16, 2014 at 01:36:37PM -0800, Brian Norris wrote:
>> > + case 7:
>> > + mtd->oobsize = SZ_1K;
>>
>> #include <linux/sizes.h>
>>
>> Did you compile this?
> we do not need this header.
My compiler begs to differ :)
CC [M] drivers/mtd/nand/nand_base.o
drivers/mtd/nand/nand_base.c: In function ‘nand_decode_ext_id’:
drivers/mtd/nand/nand_base.c:3159:19: error: ‘SZ_1K’ undeclared (first
use in this function)
mtd->oobsize = SZ_1K;
^
drivers/mtd/nand/nand_base.c:3159:19: note: each undeclared identifier
is reported only once for each function it appears in
make[3]: *** [drivers/mtd/nand/nand_base.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2
Maybe different ARCH's have implicit includes. But in any case, it's
standard practice to explicitly include the headers you're using.
> I had already tested this patch with the l2-mtd tree.
>
>>
>> Anyway, I think just using the literal 1024 is better. I can fix it up
>> and push myself in a bit.
> Different person has different taste. :)
Well, all the other sizes are literals.
> It is okay to me if you the literal 1024.
You also dropped the 'default' case, which leaves out the 0 case. I'll
reintroduce the default, to go along with case 7. I'll post the
complete patch here when/if I push it.
Brian
More information about the linux-mtd
mailing list