All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: cmm@us.ibm.com, sandeen@redhat.com, linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH -V3 1/9] ext4: sparse fixes
Date: Thu, 6 Nov 2008 17:09:54 -0500	[thread overview]
Message-ID: <20081106220954.GM18939@mit.edu> (raw)
In-Reply-To: <1225997374-10846-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Fri, Nov 07, 2008 at 12:19:26AM +0530, Aneesh Kumar K.V wrote:
>  #define EXT4_HAS_COMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_compat) & mask)
>  #define EXT4_HAS_RO_COMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_ro_compat) & mask)
>  #define EXT4_HAS_INCOMPAT_FEATURE(sb,mask)			\
> -	(EXT4_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask))
> +	(le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) & mask)

This is going to force a byte-swap instruction on every single
big-endian system out there, which could potentially be costly, or at
least undeed given that all of the times that these functions are
called, the result gets used only as a booelan.

Can we shut up sparse by using a explicit cast to an unsigned int?

       	       	      	       	 	  - Ted

  parent reply	other threads:[~2008-11-06 22:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 18:49 [RFC PATCH -V3 1/9] ext4: sparse fixes Aneesh Kumar K.V
2008-11-06 18:49 ` [RFC PATCH -V3 2/9] ext4: Add blocks added during resize to bitmap Aneesh Kumar K.V
2008-11-06 18:49   ` [RFC PATCH -V3 3/9] ext4: Use EXT4_GROUP_INFO_NEED_INIT_BIT during resize Aneesh Kumar K.V
2008-11-06 18:49     ` [RFC PATCH -V3 4/9] ext4: cleanup mballoc header files Aneesh Kumar K.V
2008-11-06 18:49       ` [RFC PATCH -V3 5/9] ext4: Add sparse annotations for the group info semaphore Aneesh Kumar K.V
2008-11-06 18:49         ` [RFC PATCH -V3 6/9] jbd2: Call journal commit callback without holding j_list_lock Aneesh Kumar K.V
2008-11-06 18:49           ` [RFC PATCH -V3 7/9] ext4: don't use blocks freed but not yet committed in buddy cache init Aneesh Kumar K.V
2008-11-06 18:49             ` [RFC PATCH -V3 8/9] ext4: Fix double free of blocks Aneesh Kumar K.V
2008-11-06 18:49               ` [RFC PATCH -V3 9/9] ext4: Fix lockdep recursive locking warning Aneesh Kumar K.V
2008-11-07  8:04                 ` Li Zefan
2008-11-07 16:22                   ` Aneesh Kumar K.V
2008-11-08  1:21                     ` Li Zefan
2008-11-06 22:37               ` [RFC PATCH -V3 8/9] ext4: Fix double free of blocks Theodore Tso
2008-11-07 16:01                 ` Aneesh Kumar K.V
2008-11-06 22:09 ` Theodore Tso [this message]
2008-11-07 14:20   ` [RFC PATCH -V3 1/9] ext4: sparse fixes Aneesh Kumar K.V
2008-11-07 14:45     ` Theodore Tso
2008-11-07 15:07     ` Christoph Hellwig

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=20081106220954.GM18939@mit.edu \
    --to=tytso@mit.edu \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@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 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.