From: Johann Lombardi <johann.lombardi@bull.net>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Andreas Dilger <adilger@clusterfs.com>,
Kalpak Shah <kalpak@clusterfs.com>,
linux-ext4 <linux-ext4@vger.kernel.org>, tytso <tytso@mit.edu>,
sct <sct@redhat.com>
Subject: Re: [RFC] [PATCH 1/1] Nanosecond timestamps
Date: Thu, 8 Feb 2007 11:33:25 +0100 [thread overview]
Message-ID: <20070208103325.GA28900@lombardij> (raw)
In-Reply-To: <1170882340.13329.4.camel@kleikamp.austin.ibm.com>
On Wed, Feb 07, 2007 at 03:05:39PM -0600, Dave Kleikamp wrote:
> On Wed, 2007-02-07 at 13:39 -0700, Andreas Dilger wrote:
> > You are right - this works fine on little endian systems, but fails on
> > big endian systems where you will get the other half of the word.
> >
> > This has been a bug in several places already, and I wonder if the
> > le*_to_cpu() and cpu_to_le*() macros shouldn't do some type checking
> > instead of just casting the variable to the specified type?
>
> I think that sparse will catch this. To get the endian checks you need
> to do something like this:
>
> make C=2 CF="-D__CHECK_ENDIAN__"'
Indeed:
CHECK fs/ext3/super.c
fs/ext3/super.c:1787:8: warning: cast to restricted type
fs/ext3/super.c:1789:6: warning: cast to restricted type
fs/ext3/super.c:1791:8: warning: cast to restricted type
fs/ext3/super.c:1793:6: warning: cast to restricted type
Thanks,
Johann
next prev parent reply other threads:[~2007-02-08 10:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 14:49 [RFC] [PATCH 1/1] Nanosecond timestamps Kalpak Shah
2007-02-06 15:12 ` Johann Lombardi
2007-02-07 20:39 ` Andreas Dilger
2007-02-07 21:05 ` Dave Kleikamp
2007-02-08 10:33 ` Johann Lombardi [this message]
2007-02-08 10:30 ` Johann Lombardi
2007-02-13 13:16 ` [PATCH Take2 " Kalpak Shah
2007-02-19 9:56 ` Johann Lombardi
2007-02-07 20:50 ` [RFC] [PATCH " Johann Lombardi
-- strict thread matches above, loose matches on Subject: below --
2007-02-02 14:39 [RFC] [PATCH 1/1] nanosecond timestamps Kalpak Shah
2007-02-06 4:09 ` Theodore Tso
2007-02-07 17:58 ` Andreas Dilger
2007-02-15 17:51 ` Theodore Tso
2007-02-25 10:36 ` Andrew Morton
2007-02-26 21:42 ` Andreas Dilger
2007-02-26 23:20 ` Dave Kleikamp
2007-02-27 0:11 ` Andreas Dilger
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=20070208103325.GA28900@lombardij \
--to=johann.lombardi@bull.net \
--cc=adilger@clusterfs.com \
--cc=kalpak@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sct@redhat.com \
--cc=shaggy@linux.vnet.ibm.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).