[PATCH] FDPIC: Move roundup() into linux/kernel.h
authorDavid Howells <dhowells@redhat.com>
Mon, 10 Jul 2006 11:44:54 +0000 (04:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:22 +0000 (13:24 -0700)
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>
arch/mips/kernel/irixelf.c
drivers/scsi/aic7xxx/aic79xx_osm.h
fs/binfmt_elf.c
fs/proc/kcore.c
fs/xfs/linux-2.6/xfs_linux.h
include/linux/kernel.h

index 10d3644..ab12c8f 100644 (file)
@@ -999,8 +999,6 @@ static inline int maydump(struct vm_area_struct *vma)
        return 1;
 }
 
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
-
 /* An ELF note in memory. */
 struct memelfnote
 {
index 9e871de..601340d 100644 (file)
@@ -93,7 +93,6 @@
 #endif
 
 /********************************** Misc Macros *******************************/
-#define        roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
 #define        powerof2(x)     ((((x)-1)&(x))==0)
 
 /************************* Forward Declarations *******************************/
index f42e642..672a3b9 100644 (file)
@@ -1185,8 +1185,6 @@ static int maydump(struct vm_area_struct *vma)
        return 1;
 }
 
-#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
-
 /* An ELF note in memory */
 struct memelfnote
 {
index 036d14d..8d6d85d 100644 (file)
@@ -42,8 +42,6 @@ const struct file_operations proc_kcore_operations = {
 #define        kc_offset_to_vaddr(o) ((o) + PAGE_OFFSET)
 #endif
 
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
-
 /* An ELF note in memory */
 struct memelfnote
 {
index 8c021dc..a13f75c 100644 (file)
@@ -215,7 +215,6 @@ BUFFER_FNS(PrivateStart, unwritten);
 #define MIN(a,b)       (min(a,b))
 #define MAX(a,b)       (max(a,b))
 #define howmany(x, y)  (((x)+((y)-1))/(y))
-#define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
 
 /*
  * Various platform dependent calls that don't fit anywhere else
index 5c1ec1f..181c69c 100644 (file)
@@ -33,6 +33,7 @@ extern const char linux_banner[];
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
 
 #define        KERN_EMERG      "<0>"   /* system is unusable                   */
 #define        KERN_ALERT      "<1>"   /* action must be taken immediately     */