[PATCH 1/2] MTD: generic FSMC NAND MTD driver

David Woodhouse dwmw2 at infradead.org
Sun Oct 24 19:28:20 EDT 2010


On Mon, 2010-09-13 at 00:35 +0200, Linus Walleij wrote:
> 
> +#define PARTITION(n, off, sz)  {.name = n, .offset = off, .size = sz}
> +
> +/*
> + * Default partition layout for small page(= 512 bytes) devices
> + * Size for "Root file system" is updated in driver based on actual device size
> + */
> +static struct mtd_partition partition_info_16KB_blk[] = {
> +       PARTITION("X-loader", 0, 4 * 0x4000),
> +       PARTITION("U-Boot", 0x10000, 20 * 0x4000),
> +       PARTITION("Kernel", 0x60000, 256 * 0x4000),
> +       PARTITION("Root File System", 0x460000, 0),
> +}; 

Er, you use a macro just so that you can use order-dependent non-C99
structure initialisation? You realise that this would do the same thing:
 #define PARTITION(a,b,c) {a,c,b}

And no, I don't think *that* would be a good idea either :)

Please fix.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation




More information about the linux-mtd mailing list