From: Harvey Harrison <harvey.harrison@gmail.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH-mm 1/8] ntfs: remove private wrapper around endian helpers
Date: Thu, 27 Nov 2008 11:35:44 -0800 [thread overview]
Message-ID: <1227814545.5511.143.camel@brick> (raw)
In-Reply-To: <B9FA83C0-9993-44BB-86AA-FA8B97A2D6A2@cam.ac.uk>
On Thu, 2008-11-27 at 08:22 +0000, Anton Altaparmakov wrote:
> Hi,
>
> On 26 Nov 2008, at 21:12, Harvey Harrison wrote:
> > The base versions handle constant folding just fine.
> > Done with sed other than the mft.c and inode.c one-liners.
>
> Have you checked the compiler output? And on all architectures? And
> on all gcc versions?
Yes I've checked the compiler output for the new byteorder helpers
for gcc 3.4, 4, 4.2 on x86.
Notice this depends on the byteorder bits in -mm. The failure of
the old bits to properly compile-time swap I've only seen at -O0,
which the new bits do properly. If you can cite a particular
version/arch that you know of where the bug arose, please let me
know.
>
> The reason I introduced the constant version are precisely that at
> least some versions of gcc at least on some architectures do NOT
> handle the constant folding and actually put in endianness conversion
> code for the constants instead of converting them at compile time.
Which ones....-O0 builds perhaps?
>
> Also you are breaking sparse checking with this patch as you remove
> some of the necessary endianness conversions (e.g. your one liner in
> mft.c which causes us to apply a binary 'not' operator on a little
> endian which sparse complains about - in fact that is the reason the
> endianness conversions are in there in the first place - I added them
> because sparse was complaining about them).
No, sparse does not complain about it. Bitwise operations are just
fine on types such as le16 etc. Try running sparse again with
my changes, there are no new warnings.
>
> Andrew, please do not apply this patch.
>
I hope you change you mind.
Harvey
next prev parent reply other threads:[~2008-11-27 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 21:12 [PATCH-mm 1/8] ntfs: remove private wrapper around endian helpers Harvey Harrison
2008-11-27 8:22 ` Anton Altaparmakov
2008-11-27 19:35 ` Harvey Harrison [this message]
2008-12-01 8:50 ` Anton Altaparmakov
2008-12-01 8:55 ` Harvey Harrison
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=1227814545.5511.143.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=aia21@cam.ac.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox