[withdrawn] kernelh-add-is_ptr_aligned-macro.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: kernel.h: add IS_PTR_ALIGNED() macro
has been removed from the -mm tree.  Its filename was
     kernelh-add-is_ptr_aligned-macro.patch

This patch was dropped because it was withdrawn

------------------------------------------------------
From: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Subject: kernel.h: add IS_PTR_ALIGNED() macro

We often check if a pointer has a specific alignment.  Because the '&'
(bitwise AND) operator cannot take a pointer for the operand, so we need a
cast like, IS_ALIGNED((unsigned long)p, a).

IS_PTR_ALIGNED will be useful as a shorthand.

Link: http://lkml.kernel.org/r/1490782930-30429-1-git-send-email-yamada.masahiro@xxxxxxxxxxxxx
Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/kernel.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN include/linux/kernel.h~kernelh-add-is_ptr_aligned-macro include/linux/kernel.h
--- a/include/linux/kernel.h~kernelh-add-is_ptr_aligned-macro
+++ a/include/linux/kernel.h
@@ -50,6 +50,7 @@
 #define __ALIGN_MASK(x, mask)	__ALIGN_KERNEL_MASK((x), (mask))
 #define PTR_ALIGN(p, a)		((typeof(p))ALIGN((unsigned long)(p), (a)))
 #define IS_ALIGNED(x, a)		(((x) & ((typeof(x))(a) - 1)) == 0)
+#define IS_PTR_ALIGNED(p, a)		(IS_ALIGNED((unsigned long)p, a))
 
 /* generic data direction definitions */
 #define READ			0
_

Patches currently in -mm which might be from yamada.masahiro@xxxxxxxxxxxxx are

scripts-spellingtxt-add-intialised-pattern-and-fix-typo-instances.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux