Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e8c4273ef4f631a896650bd2ade4c1b6487131b Commit: 9e8c4273ef4f631a896650bd2ade4c1b6487131b Parent: e7c310c36e5fdf1b83a459e5db167bfbd86137db Author: vignesh babu <[EMAIL PROTECTED]> AuthorDate: Sun Jul 15 23:41:36 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Jul 16 09:05:50 2007 -0700
is_power_of_2: ufs/super.c Replace (n & (n-1)) with is_power_of_2 Signed-off-by: vignesh babu <[EMAIL PROTECTED]> Acked-by: Evgeniy Dushistov <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/ufs/super.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 22ff6ed..2b30116 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -87,6 +87,7 @@ #include <linux/smp_lock.h> #include <linux/buffer_head.h> #include <linux/vfs.h> +#include <linux/log2.h> #include "swab.h" #include "util.h" @@ -854,7 +855,7 @@ magic_found: uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); - if (uspi->s_fsize & (uspi->s_fsize - 1)) { + if (!is_power_of_2(uspi->s_fsize)) { printk(KERN_ERR "ufs_read_super: fragment size %u is not a power of 2\n", uspi->s_fsize); goto failed; @@ -869,7 +870,7 @@ magic_found: uspi->s_fsize); goto failed; } - if (uspi->s_bsize & (uspi->s_bsize - 1)) { + if (!is_power_of_2(uspi->s_bsize)) { printk(KERN_ERR "ufs_read_super: block size %u is not a power of 2\n", uspi->s_bsize); goto failed; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html