linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: linux-ext4@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] EXT4:  Use is_power_of_2() routine for clarity.
Date: Fri, 24 Apr 2009 10:03:31 -0500	[thread overview]
Message-ID: <49F1D4C3.5040804@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0904240905050.12966@localhost.localdomain>

Robert P. J. Day wrote:
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

Looks fine, thanks.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 2958f4e..479d5ef 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1479,7 +1479,7 @@ set_qf_format:
>  				return 0;
>  			if (option < 0 || option > (1 << 30))
>  				return 0;
> -			if (option & (option - 1)) {
> +			if (!is_power_of_2(option)) {
>  				printk(KERN_ERR "EXT4-fs: inode_readahead_blks"
>  				       " must be a power of 2\n");
>  				return 0;
> @@ -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;
> 
>  	sbi->s_inode_readahead_blks = t;
> 

  reply	other threads:[~2009-04-24 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24 13:06 [PATCH] EXT4: Use is_power_of_2() routine for clarity Robert P. J. Day
2009-04-24 15:03 ` Eric Sandeen [this message]
2009-04-24 17:34   ` Theodore Tso
2009-04-25  4:00     ` [PATCH] ext4: Use is_power_of_2() " Theodore Ts'o

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=49F1D4C3.5040804@redhat.com \
    --to=sandeen@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /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).