From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 21 Oct 2011 21:09:14 +0200 Subject: [U-Boot] [PATCH 1/2] Flatten and solidify block_dev_desc layout In-Reply-To: <1319178708-10881-2-git-send-email-clchiou@chromium.org> References: <1319178708-10881-1-git-send-email-clchiou@chromium.org> <1319178708-10881-2-git-send-email-clchiou@chromium.org> Message-ID: <20111021190914.8C7DB18AE81C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Che-Liang Chiou, In message <1319178708-10881-2-git-send-email-clchiou@chromium.org> you wrote: > The block_dev_desc struct has #ifdef on lba48 and variable-size on lba > and so its layout varies from config to config. At least part_efi.c has > partially complained about this. > > This patch makes lba48 be always defined and lba be fixed to largest > size that an LBA would need so that the block_dev_desc layout would be > an invariant with respect to configurations. > > Doing so would waste a few extra bytes per struct block_dev_desc, which > I believe is not critical. How much exactly is "a few bytes"? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de As long as we're going to reinvent the wheel again, we might as well try making it round this time. - Mike Dennison