From: vignesh babu <vignesh.babu@wipro.com>
To: tony.luck@intel.com, rohit.seth@intel.com, kenneth.w.chen@intel.com
Cc: linux-ia64@vger.kernel.org, linux-mm@kvack.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Kernel Janitors List <kernel-janitors@lists.osdl.org>
Subject: [KJ] (no subject)
Date: Thu, 07 Jun 2007 09:57:23 +0000 [thread overview]
Message-ID: <1181209523.10486.1.camel@merlin.linuxcoe.com> (raw)
In-Reply-To: <4277F774.9070506@tampabay.rr.com>
Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2
Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
---
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f..d22861c 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
+#include <linux/log2.h>
#include <asm/mman.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
tr_pages = 0x15557000UL;
size = memparse(str, &str);
- if (*str || (size & (size-1)) || !(tr_pages & size) ||
+ if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
size <= PAGE_SIZE ||
size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
printk(KERN_WARNING "Invalid huge page size specified\n");
--
Vignesh Babu BM
_____________________________________________________________
"Why is it that every time I'm with you, makes me believe in magic?"
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
WARNING: multiple messages have this Message-ID (diff)
From: vignesh babu <vignesh.babu@wipro.com>
To: tony.luck@intel.com, rohit.seth@intel.com, kenneth.w.chen@intel.com
Cc: linux-ia64@vger.kernel.org, linux-mm@kvack.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Kernel Janitors List <kernel-janitors@lists.osdl.org>
Subject:
Date: Thu, 07 Jun 2007 15:15:23 +0530 [thread overview]
Message-ID: <1181209523.10486.1.camel@merlin.linuxcoe.com> (raw)
Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2
Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
---
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f..d22861c 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
+#include <linux/log2.h>
#include <asm/mman.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
tr_pages = 0x15557000UL;
size = memparse(str, &str);
- if (*str || (size & (size-1)) || !(tr_pages & size) ||
+ if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
size <= PAGE_SIZE ||
size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
printk(KERN_WARNING "Invalid huge page size specified\n");
--
Vignesh Babu BM
_____________________________________________________________
"Why is it that every time I'm with you, makes me believe in magic?"
WARNING: multiple messages have this Message-ID (diff)
From: vignesh babu <vignesh.babu@wipro.com>
To: tony.luck@intel.com, rohit.seth@intel.com, kenneth.w.chen@intel.com
Cc: linux-ia64@vger.kernel.org, linux-mm@kvack.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Kernel Janitors List <kernel-janitors@lists.osdl.org>
Subject:
Date: Thu, 07 Jun 2007 15:15:23 +0530 [thread overview]
Message-ID: <1181209523.10486.1.camel@merlin.linuxcoe.com> (raw)
Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2
Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
---
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f..d22861c 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
+#include <linux/log2.h>
#include <asm/mman.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
tr_pages = 0x15557000UL;
size = memparse(str, &str);
- if (*str || (size & (size-1)) || !(tr_pages & size) ||
+ if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
size <= PAGE_SIZE ||
size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
printk(KERN_WARNING "Invalid huge page size specified\n");
--
Vignesh Babu BM
_____________________________________________________________
"Why is it that every time I'm with you, makes me believe in magic?"
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next parent reply other threads:[~2007-06-07 9:57 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 9:45 vignesh babu [this message]
2007-06-07 9:57 ` [KJ] (no subject) vignesh babu
2007-06-07 9:45 ` vignesh babu
-- strict thread matches above, loose matches on Subject: below --
2006-06-05 2:08 [KJ] (no subject) Catalina Melvin
2006-06-19 5:47 ` Crescent E. Permission
2006-07-05 15:18 ` Attractively C. Pin
2006-07-19 5:44 ` Scrimmaging T. Prompter
2006-08-07 12:22 ` Injustice H. Tack
2006-08-18 7:14 ` Calumniate H. Adventuresses
2006-09-13 19:53 ` Balaji Rao
2006-11-11 0:47 ` Gentlest R. Exhaustion
2006-11-12 13:28 ` Scotland H. Swoon
2007-01-19 10:11 ` kristofer palmer
2007-04-11 0:30 ` Issa Gasson
2005-05-03 22:13 Tim Redman
2005-07-03 18:08 ` solt
2005-11-02 0:17 ` Kernel-hackingpdemb
2006-01-16 21:01 ` Eric Sesterhenn / snakebyte
2006-02-15 18:36 ` carlin virginie
2007-04-24 23:55 ` Vernon Knox
2007-07-18 7:13 ` Emma
2007-07-19 20:55 ` Fleming T. Luke
2007-07-20 2:21 ` Emilia
2007-07-20 4:38 ` Israel Hyde
2007-07-20 12:55 ` Kirby B. Jenny
2007-07-20 15:18 ` Holloway S. Leslie
2007-07-24 1:21 ` Golden Terry
2007-07-25 12:08 ` Netty Clark
2007-07-25 12:09 ` Carol Durham
2007-07-25 17:06 ` Aguilar
2007-07-26 0:24 ` Benjamin
2007-07-26 0:25 ` Clark
2007-07-28 9:54 ` Ronald W. Harding
2007-07-29 8:44 ` Montoya K. Ik
2007-07-29 10:37 ` Bridget C. Herring
2007-07-29 12:00 ` Johannis
2007-07-30 1:13 ` Berg J. Jane
2007-07-30 8:38 ` Jeremiah
2007-07-30 21:32 ` Pugh V. Blanch
2007-07-31 5:47 ` Morgan Wang
2007-07-31 23:52 ` Sol
2007-07-31 23:53 ` Fanny
2007-08-01 9:56 ` Kathleen Andersen
2007-08-01 13:18 ` Peter E. Reid
2007-08-09 18:33 ` Farooq Nassor
2007-08-09 18:33 ` Husein ledger
2007-08-09 18:34 ` Fedon Finken
2007-08-09 18:34 ` arvind tamburr
2007-08-09 19:05 ` Leanne Pacsai
2007-08-09 19:11 ` huan minniti
2007-08-09 19:14 ` Luxy Herak
2007-08-20 16:32 ` katsunori luc
2007-08-23 1:16 ` annette.schneider
2007-08-23 16:36 ` kidss
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=1181209523.10486.1.camel@merlin.linuxcoe.com \
--to=vignesh.babu@wipro.com \
--cc=kenneth.w.chen@intel.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rohit.seth@intel.com \
--cc=tony.luck@intel.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.