From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Yanok Date: Thu, 20 Aug 2009 15:48:56 +0400 Subject: [U-Boot] [PATCH] jffs2: some fixes to summary support In-Reply-To: <200907181528.25911.vapier@gentoo.org> References: <1247828562-9854-1-git-send-email-yanok@emcraft.com> <200907181528.25911.vapier@gentoo.org> Message-ID: <4A8D3828.3040902@emcraft.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, Mike Frysinger wrote: >> +#ifdef CONFIG_JFFS2_SUMMARY >> +static u32 sum_get_unaligned32(u32 *ptr) >> +{ >> + u32 val; >> + u8 *p = (u8 *)ptr; >> + >> + val = *p | (*(p + 1) << 8) | (*(p + 2) << 16) | (*(p + 3) << 24); >> + >> + return __le32_to_cpu(val); >> +} >> + >> +static u16 sum_get_unaligned16(u16 *ptr) >> +{ >> + u16 val; >> + u8 *p = (u8 *)ptr; >> + >> + val = *p | (*(p + 1) << 8); >> + >> + return __le16_to_cpu(val); >> +} >> > > do get_unaligned_le16 and such not work ? > Nope. They do only some typecasting and resulting code still uses word (halfword) access instructions. Regards, Ilya.