Re: [PATCH] EXT4: Use is_power_of_2() routine for clarity.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 24, 2009 at 10:03:31AM -0500, Eric Sandeen wrote:
> > @@ -2092,7 +2092,7 @@ static ssize_t inode_readahead_blks_store(struct ext4_attr *a,
> >  		return -EINVAL;
> > 
> >  	/* inode_readahead_blks must be a power of 2 */
> > -	if (t & (t-1))
> > +	if (!is_power_of_2(t))
> >  		return -EINVAL;

Might as well remove the comment; it's not needed if we're going to be
using is_power_of_2().

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux