aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/lib/usercopy.c3
-rw-r--r--arch/x86/include/asm/word-at-a-time.h4
-rw-r--r--fs/namei.c1
-rw-r--r--include/linux/kernel.h2
4 files changed, 6 insertions, 4 deletions
diff --git a/arch/sparc/lib/usercopy.c b/arch/sparc/lib/usercopy.c
index f61ed820cb6..0b12e91d6cc 100644
--- a/arch/sparc/lib/usercopy.c
+++ b/arch/sparc/lib/usercopy.c
@@ -1,5 +1,6 @@
1#include <linux/module.h> 1#include <linux/module.h>
2#include <linux/uaccess.h> 2#include <linux/uaccess.h>
3#include <linux/kernel.h>
3#include <linux/errno.h> 4#include <linux/errno.h>
4#include <linux/bug.h> 5#include <linux/bug.h>
5 6
@@ -11,8 +12,6 @@ void copy_from_user_overflow(void)
11} 12}
12EXPORT_SYMBOL(copy_from_user_overflow); 13EXPORT_SYMBOL(copy_from_user_overflow);
13 14
14#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
15
16static inline long find_zero(unsigned long mask) 15static inline long find_zero(unsigned long mask)
17{ 16{
18 long byte = 0; 17 long byte = 0;
diff --git a/arch/x86/include/asm/word-at-a-time.h b/arch/x86/include/asm/word-at-a-time.h
index e58f03b206c..ae03facfadd 100644
--- a/arch/x86/include/asm/word-at-a-time.h
+++ b/arch/x86/include/asm/word-at-a-time.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_WORD_AT_A_TIME_H 1#ifndef _ASM_WORD_AT_A_TIME_H
2#define _ASM_WORD_AT_A_TIME_H 2#define _ASM_WORD_AT_A_TIME_H
3 3
4#include <linux/kernel.h>
5
4/* 6/*
5 * This is largely generic for little-endian machines, but the 7 * This is largely generic for little-endian machines, but the
6 * optimal byte mask counting is probably going to be something 8 * optimal byte mask counting is probably going to be something
@@ -35,8 +37,6 @@ static inline long count_masked_bytes(long mask)
35 37
36#endif 38#endif
37 39
38#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
39
40/* Return the high bit set in the first byte that is a zero */ 40/* Return the high bit set in the first byte that is a zero */
41static inline unsigned long has_zero(unsigned long a) 41static inline unsigned long has_zero(unsigned long a)
42{ 42{
diff --git a/fs/namei.c b/fs/namei.c
index f9e883c1b85..8d2ba420e42 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/export.h> 18#include <linux/export.h>
19#include <linux/kernel.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20#include <linux/fs.h> 21#include <linux/fs.h>
21#include <linux/namei.h> 22#include <linux/namei.h>
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 645231c373c..fbe9bfacb8d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -38,6 +38,8 @@
38 38
39#define STACK_MAGIC 0xdeadbeef 39#define STACK_MAGIC 0xdeadbeef
40 40
41#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
42
41#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) 43#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
42#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) 44#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask))
43#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) 45#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))