]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
kernel: Move REPEAT_BYTE definition into linux/kernel.h
authorDavid S. Miller <davem@davemloft.net>
Thu, 24 May 2012 03:12:50 +0000 (20:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 May 2012 20:10:05 +0000 (13:10 -0700)
And make sure that everything using it explicitly includes
that header file.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/lib/usercopy.c
arch/x86/include/asm/word-at-a-time.h
fs/namei.c
include/linux/kernel.h

index f61ed820cb613020e33e284780f84420aee6bfe4..0b12e91d6cccd509835f16bfb145d7296f9ca8ed 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/module.h>
 #include <linux/uaccess.h>
+#include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/bug.h>
 
@@ -11,8 +12,6 @@ void copy_from_user_overflow(void)
 }
 EXPORT_SYMBOL(copy_from_user_overflow);
 
-#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
-
 static inline long find_zero(unsigned long mask)
 {
        long byte = 0;
index e58f03b206c3fb187b469032a1aba09b9d63ec05..ae03facfadd6b7d50a6dab41a61bfe7cb5728cab 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _ASM_WORD_AT_A_TIME_H
 #define _ASM_WORD_AT_A_TIME_H
 
+#include <linux/kernel.h>
+
 /*
  * This is largely generic for little-endian machines, but the
  * optimal byte mask counting is probably going to be something
@@ -35,8 +37,6 @@ static inline long count_masked_bytes(long mask)
 
 #endif
 
-#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
-
 /* Return the high bit set in the first byte that is a zero */
 static inline unsigned long has_zero(unsigned long a)
 {
index f9e883c1b856526fe65ac485c4c225a7407d3fa9..8d2ba420e42fe1f7660509a18ceee35097330211 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/init.h>
 #include <linux/export.h>
+#include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/namei.h>
index 645231c373c8a5b5684e806a9d13647d1eb3300e..fbe9bfacb8db6e4bc212ccb87e1b6ab00d2aa15b 100644 (file)
@@ -38,6 +38,8 @@
 
 #define STACK_MAGIC    0xdeadbeef
 
+#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
+
 #define ALIGN(x, a)            __ALIGN_KERNEL((x), (a))
 #define __ALIGN_MASK(x, mask)  __ALIGN_KERNEL_MASK((x), (mask))
 #define PTR_ALIGN(p, a)                ((typeof(p))ALIGN((unsigned long)(p), (a)))