Commit b4cac1a0 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

[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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 01bf466e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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
{
+0 −1
Original line number Diff line number Diff line
@@ -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 *******************************/
+0 −2
Original line number Diff line number Diff line
@@ -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
{
+0 −2
Original line number Diff line number Diff line
@@ -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
{
+0 −1
Original line number Diff line number Diff line
@@ -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
Loading