aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-07-10 07:44:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:22 -0400
commitb4cac1a0227a6f84be0381cd350a3c8730a4a671 (patch)
tree24bf1aa95d1977161774210bbb9bf697ad0fe5e9
parent01bf466e1866feeb7fce0319cbafe0166e29f5e4 (diff)
[PATCH] FDPIC: Move roundup() into linux/kernel.h
Move the roundup() macro from binfmt_elf.c into linux/kernel.h as it's generally useful. [akpm@osdl.org: nuke all the other implementations] Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/mips/kernel/irixelf.c2
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.h1
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/proc/kcore.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h1
-rw-r--r--include/linux/kernel.h1
6 files changed, 1 insertions, 8 deletions
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index 10d3644e3608..ab12c8f01518 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -999,8 +999,6 @@ static inline int maydump(struct vm_area_struct *vma)
999 return 1; 999 return 1;
1000} 1000}
1001 1001
1002#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
1003
1004/* An ELF note in memory. */ 1002/* An ELF note in memory. */
1005struct memelfnote 1003struct memelfnote
1006{ 1004{
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
index 9e871de23835..601340d84410 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -93,7 +93,6 @@
93#endif 93#endif
94 94
95/********************************** Misc Macros *******************************/ 95/********************************** Misc Macros *******************************/
96#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
97#define powerof2(x) ((((x)-1)&(x))==0) 96#define powerof2(x) ((((x)-1)&(x))==0)
98 97
99/************************* Forward Declarations *******************************/ 98/************************* Forward Declarations *******************************/
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index f42e64210ee5..672a3b90bc55 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1185,8 +1185,6 @@ static int maydump(struct vm_area_struct *vma)
1185 return 1; 1185 return 1;
1186} 1186}
1187 1187
1188#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
1189
1190/* An ELF note in memory */ 1188/* An ELF note in memory */
1191struct memelfnote 1189struct memelfnote
1192{ 1190{
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 036d14d83627..8d6d85d7400f 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -42,8 +42,6 @@ const struct file_operations proc_kcore_operations = {
42#define kc_offset_to_vaddr(o) ((o) + PAGE_OFFSET) 42#define kc_offset_to_vaddr(o) ((o) + PAGE_OFFSET)
43#endif 43#endif
44 44
45#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
46
47/* An ELF note in memory */ 45/* An ELF note in memory */
48struct memelfnote 46struct memelfnote
49{ 47{
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 8c021dc57d1f..a13f75c1a936 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -215,7 +215,6 @@ BUFFER_FNS(PrivateStart, unwritten);
215#define MIN(a,b) (min(a,b)) 215#define MIN(a,b) (min(a,b))
216#define MAX(a,b) (max(a,b)) 216#define MAX(a,b) (max(a,b))
217#define howmany(x, y) (((x)+((y)-1))/(y)) 217#define howmany(x, y) (((x)+((y)-1))/(y))
218#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
219 218
220/* 219/*
221 * Various platform dependent calls that don't fit anywhere else 220 * Various platform dependent calls that don't fit anywhere else
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 5c1ec1f84eab..181c69cad4e3 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -33,6 +33,7 @@ extern const char linux_banner[];
33#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 33#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
34#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) 34#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
35#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) 35#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
36#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
36 37
37#define KERN_EMERG "<0>" /* system is unusable */ 38#define KERN_EMERG "<0>" /* system is unusable */
38#define KERN_ALERT "<1>" /* action must be taken immediately */ 39#define KERN_ALERT "<1>" /* action must be taken immediately */