[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1363172096.11441.11.camel@sauron.fi.intel.com>
Date: Wed, 13 Mar 2013 12:54:56 +0200
From: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
To: Huang Shijie <b32955@...escale.com>
Cc: dwmw2@...radead.org, computersforpeace@...il.com,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 1/3] mtd: add new fields to nand_flash_dev{}
On Thu, 2013-03-07 at 18:49 +0800, Huang Shijie wrote:
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 591eeeb..f0a9d93 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -578,6 +578,8 @@ struct nand_chip {
> * @erasesize: eraseblock size in bytes (determined from the extended ID if 0)
> * @chipsize: total chip size in MiB
> * @options: stores various chip bit options
> + * @id_len: The valid length of the @id.
> + * @oobsize: OOB size
> */
> struct nand_flash_dev {
> char *name;
> @@ -592,6 +594,8 @@ struct nand_flash_dev {
> unsigned long chipsize;
> unsigned long erasesize;
> unsigned long options;
> + unsigned long id_len;
> + unsigned long oobsize;
> };
Why are these of type 'long', which is 64 bits in 64-bit architectures,
which seems to be unnecessarily big. Wouldn't 'unsigned int' be enough?
Also, can we avoid having the 'id_len' field? Can the end of the
sequence of ID's be marked with a '0' or '0xFF' marker instead?
--
Best Regards,
Artem Bityutskiy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists