mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] linux-mmh-canonicalize-macro-page_aligned-definition.patch removed from -mm tree
@ 2016-10-10 22:57 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-10-10 22:57 UTC (permalink / raw)
  To: zijun_hu, mm-commits


The patch titled
     Subject: linux/mm.h: canonicalize macro PAGE_ALIGNED() definition
has been removed from the -mm tree.  Its filename was
     linux-mmh-canonicalize-macro-page_aligned-definition.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: zijun_hu <zijun_hu@htc.com>
Subject: linux/mm.h: canonicalize macro PAGE_ALIGNED() definition

macro PAGE_ALIGNED() is prone to cause error because it doesn't follow
convention to parenthesize parameter @addr within macro body, for example
unsigned long *ptr = kmalloc(...); PAGE_ALIGNED(ptr + 16); for the left
parameter of macro IS_ALIGNED(), (unsigned long)(ptr + 16) is desired but
the actual one is (unsigned long)ptr + 16.

It is fixed by simply canonicalizing macro PAGE_ALIGNED() definition.

Link: http://lkml.kernel.org/r/57EA6AE7.7090807@zoho.com
Signed-off-by: zijun_hu <zijun_hu@htc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mm.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN include/linux/mm.h~linux-mmh-canonicalize-macro-page_aligned-definition include/linux/mm.h
--- a/include/linux/mm.h~linux-mmh-canonicalize-macro-page_aligned-definition
+++ a/include/linux/mm.h
@@ -126,7 +126,7 @@ extern int overcommit_kbytes_handler(str
 #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
 
 /* test whether an address (unsigned long or pointer) is aligned to PAGE_SIZE */
-#define PAGE_ALIGNED(addr)	IS_ALIGNED((unsigned long)addr, PAGE_SIZE)
+#define PAGE_ALIGNED(addr)	IS_ALIGNED((unsigned long)(addr), PAGE_SIZE)
 
 /*
  * Linux kernel virtual memory manager primitives.
_

Patches currently in -mm which might be from zijun_hu@htc.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-10 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 22:57 [merged] linux-mmh-canonicalize-macro-page_aligned-definition.patch removed from -mm tree akpm

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