All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Yanok <yanok@emcraft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] jffs2: some fixes to summary support
Date: Thu, 20 Aug 2009 15:48:56 +0400	[thread overview]
Message-ID: <4A8D3828.3040902@emcraft.com> (raw)
In-Reply-To: <200907181528.25911.vapier@gentoo.org>

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.

  reply	other threads:[~2009-08-20 11:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 11:02 [U-Boot] [PATCH] jffs2: some fixes to summary support Ilya Yanok
2009-07-18 19:28 ` Mike Frysinger
2009-08-20 11:48   ` Ilya Yanok [this message]
2009-08-21 13:07     ` Detlev Zundel
2009-08-21 18:47       ` Scott Wood
2009-08-24  9:20         ` Detlev Zundel
2009-08-24 10:13           ` Wolfgang Denk
2009-08-21 21:29 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A8D3828.3040902@emcraft.com \
    --to=yanok@emcraft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.