mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Alexey Dobriyan <adobriyan@mail.ru>,
	Andrew Morton <akpm@osdl.org>,
	ext3 users list <ext3-users@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ext3: Fix sparse -Wbitwise warnings.
Date: Tue, 15 Feb 2005 16:46:37 -0700	[thread overview]
Message-ID: <20050215234637.GI27352@schnapps.adilger.int> (raw)
In-Reply-To: <20050215232939.GD16892@gaz.sfgoth.com>

[-- Attachment #1: Type: text/plain, Size: 826 bytes --]

On Feb 15, 2005  15:29 -0800, Mitchell Blank Jr wrote:
> Stephen C. Tweedie wrote:
> > If we want to fix this, let's fix the macros: for example, convert
> > EXT3_HAS_COMPAT_FEATURE to be
> > 
> > 	( le32_to_cpu(EXT3_SB(sb)->s_es->s_feature_compat) & (mask) )
> 
> Of course that's less efficient though since "mask" is probably constant..
> so now the endian conversion changed from compile-time to run-time.
> 
> Would something like
> 
>  	( ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) ) != 0)
> 
> be enough to satisfy sparse?

Or we could cast "mask" to the appropriate type (I'm not sure what sparse
uses to determine this).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/             http://members.shaw.ca/golinux/


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2005-02-15 23:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15 10:46 Alexey Dobriyan
2005-02-15 14:12 ` Stephen C. Tweedie
2005-02-15 18:13   ` Alexey Dobriyan
2005-02-15 23:29   ` Mitchell Blank Jr
2005-02-15 23:25     ` Stephen C. Tweedie
2005-02-15 23:46     ` Andreas Dilger [this message]

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=20050215234637.GI27352@schnapps.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=adobriyan@mail.ru \
    --cc=akpm@osdl.org \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch@sfgoth.com \
    --cc=sct@redhat.com \
    /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

all inboxes | Powered by JetHome®