From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 18 Jan 2011 11:01:57 +0530 Subject: [U-Boot] [PATCH 7/8] armv7: adapt omap3 to the new cache maintenance framework In-Reply-To: <20110117215511.CEFB5D1CAD5@gemini.denx.de> References: <1293018898-13253-1-git-send-email-aneesh@ti.com> <1293018898-13253-8-git-send-email-aneesh@ti.com> <20110109225729.4695B127@gemini.denx.de> <4D2B1A90.9030109@ti.com> <20110117215511.CEFB5D1CAD5@gemini.denx.de> Message-ID: <4D3525CD.8090001@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang, On Tuesday 18 January 2011 03:25 AM, Wolfgang Denk wrote: > Dear Aneesh V, > > In message<4D2B1A90.9030109@ti.com> you wrote: >> >>>> +struct __attribute__ ((__packed__)) emu_hal_params { >>>> + u32 num_params; >>>> + u32 param1; >>>> +}; >>> >>> Why exactly do we need the "__attribute__ ((__packed__))" here? >> >> Because a pointer to it has to be passed to ROM code and ROM code >> wouldn't expect any padding. > > But padding would only be needed if there were any alignment > requirements requiring it. There are none here. Yes. But, is that guaranteed? I didn't want to make it compiler dependent. Isn't it safer to use '__attribute__ ((__packed__))' Best regards, Aneesh