From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com ([143.182.124.21]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCpJN-0005ME-Lk for linux-mtd@lists.infradead.org; Tue, 05 Mar 2013 10:41:34 +0000 Message-ID: <1362480128.2943.51.camel@sauron> Subject: Re: [PATCH 12/12] mtd: nand: provision full ID support From: Artem Bityutskiy To: Huang Shijie Date: Tue, 05 Mar 2013 12:42:08 +0200 In-Reply-To: References: <1362415349-7107-1-git-send-email-dedekind1@gmail.com> <1362415349-7107-13-git-send-email-dedekind1@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Huang Shijie , Brian Norris , Mike Dunn , MTD Maling List Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2013-03-05 at 14:08 +0800, Huang Shijie wrote: > > struct nand_flash_dev { > > char *name; > > - int dev_id; > > + union { > > + struct { > > + uint8_t mfr_id; > > + uint8_t dev_id; > > + }; > > + uint8_t id[8]; > > + }; > > > We can add a new helper like compare_nand_with_devid() to remove the > mfr_id and dev_id, only left the id[8]. Huang, did you miss the "union { ... }" part or you think using 'id[N]' directly is readable enough? -- Best Regards, Artem Bityutskiy