linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	andi@firstfloor.org, rientjes@google.com, riel@redhat.com,
	isimatu.yasuaki@jp.fujitsu.com, yinghai@kernel.org,
	davidlohr@hp.com
Subject: [PATCH 2/3] hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED()
Date: Wed, 12 Nov 2014 17:33:12 -0500	[thread overview]
Message-ID: <1415831593-9020-3-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1415831593-9020-1-git-send-email-lcapitulino@redhat.com>

No reason to duplicate the code of an existing macro.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 mm/hugetlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 9fd7227..a10fd57 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1457,7 +1457,7 @@ int __weak alloc_bootmem_huge_page(struct hstate *h)
 	return 0;
 
 found:
-	BUG_ON((unsigned long)virt_to_phys(m) & (huge_page_size(h) - 1));
+	BUG_ON(!IS_ALIGNED(virt_to_phys(m), huge_page_size(h)));
 	/* Put them into a private list first because mem_map is not up yet */
 	list_add(&m->list, &huge_boot_pages);
 	m->hstate = h;
-- 
1.9.3

--
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>

  parent reply	other threads:[~2014-11-12 22:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 22:33 [PATCH 0/3] hugetlb: misc small fixes/improvements Luiz Capitulino
2014-11-12 22:33 ` [PATCH 1/3] hugetlb: fix hugepages= entry in kernel-parameters.txt Luiz Capitulino
2014-11-17  0:11   ` Naoya Horiguchi
2014-11-19 22:39   ` David Rientjes
2014-11-12 22:33 ` Luiz Capitulino [this message]
2014-11-17  0:11   ` [PATCH 2/3] hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED() Naoya Horiguchi
2014-11-19 22:42   ` David Rientjes
2014-11-12 22:33 ` [PATCH 3/3] hugetlb: hugetlb_register_all_nodes(): add __init marker Luiz Capitulino
2014-11-17  0:12   ` Naoya Horiguchi
2014-11-19 22:43   ` David Rientjes

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=1415831593-9020-3-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=davidlohr@hp.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=yinghai@kernel.org \
    /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