lkml.org 
[lkml]   [2005]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ext3: Fix sparse -Wbitwise warnings.
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/

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.040 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site