linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: dedekind@infradead.org
Cc: Adrian Hunter <ext-adrian.hunter@nokia.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ubifs: endian handling fixes and annotations
Date: Sat, 25 Oct 2008 11:52:55 -0700	[thread overview]
Message-ID: <1224960775.5784.13.camel@brick> (raw)
In-Reply-To: <1224932256.4466.135.camel@sauron>

On Sat, 2008-10-25 at 13:57 +0300, Artem Bityutskiy wrote:
> Harvey,
> 
> On Fri, 2008-10-24 at 10:52 -0700, Harvey Harrison wrote:
> > Noticed by sparse:
> > fs/ubifs/file.c:75:2: warning: restricted __le64 degrades to integer
> > fs/ubifs/file.c:629:4: warning: restricted __le64 degrades to integer
> > fs/ubifs/dir.c:431:3: warning: restricted __le64 degrades to integer
> > 
> > This should be checked to ensure the ubifs_assert is working as
> > intended, I've done the suggested annotation in this patch.
> > 
> > fs/ubifs/sb.c:298:6: warning: incorrect type in assignment (different base types)
> > fs/ubifs/sb.c:298:6:    expected int [signed] [assigned] tmp
> > fs/ubifs/sb.c:298:6:    got restricted __le64 [usertype] <noident>
> > fs/ubifs/sb.c:299:19: warning: incorrect type in assignment (different base types)
> > fs/ubifs/sb.c:299:19:    expected restricted __le64 [usertype] atime_sec
> > fs/ubifs/sb.c:299:19:    got int [signed] [assigned] tmp
> > fs/ubifs/sb.c:300:19: warning: incorrect type in assignment (different base types)
> > fs/ubifs/sb.c:300:19:    expected restricted __le64 [usertype] ctime_sec
> > fs/ubifs/sb.c:300:19:    got int [signed] [assigned] tmp
> > fs/ubifs/sb.c:301:19: warning: incorrect type in assignment (different base types)
> > fs/ubifs/sb.c:301:19:    expected restricted __le64 [usertype] mtime_sec
> > fs/ubifs/sb.c:301:19:    got int [signed] [assigned] tmp
> 
> ... snip ...
> 
> thanks for the patch. It's shame we did not fix this ourselves. We did
> run sparse before submitting UBIFS and did not see these warnings.
> Probably sparse has been improved recently. Anyway, thank you, I'll look
> closer at your patch and apply it to ubifs-2.6.git.
> 

Run sparse with -D__CHECK_ENDIAN__ to see these warnings.

Harvey




  reply	other threads:[~2008-10-25 18:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 17:52 [PATCH] ubifs: endian handling fixes and annotations Harvey Harrison
2008-10-25 10:57 ` Artem Bityutskiy
2008-10-25 18:52   ` Harvey Harrison [this message]
2008-10-26 10:12     ` Artem Bityutskiy
2008-10-26 13:22     ` Artem Bityutskiy
2008-10-26 18:44       ` Harvey Harrison
2008-11-21 17:19 UBIFS updates for 2.6.28 Artem Bityutskiy
2008-11-21 17:19 ` [PATCH] UBIFS: endian handling fixes and annotations Artem Bityutskiy
2008-11-22 19:27   ` Sebastian Andrzej Siewior
2008-11-23  3:21     ` Harvey Harrison
2008-11-23  9:28       ` Sebastian Andrzej Siewior
2008-11-23 10:05     ` Jamie Lokier
2008-11-24 14:19     ` Adrian Hunter
2008-11-24 16:46       ` Harvey Harrison
2008-12-02  9:12     ` Artem Bityutskiy

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=1224960775.5784.13.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dedekind@infradead.org \
    --cc=ext-adrian.hunter@nokia.com \
    --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;
as well as URLs for NNTP newsgroup(s).