Skip to content

Commit

Permalink
[PATCH] FDPIC: Move roundup() into linux/kernel.h
Browse files Browse the repository at this point in the history
Move the roundup() macro from binfmt_elf.c into linux/kernel.h as it's
generally useful.

[[email protected]: nuke all the other implementations]
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and Linus Torvalds committed Jul 10, 2006
1 parent 01bf466 commit b4cac1a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions arch/mips/kernel/irixelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/aic7xxx/aic79xx_osm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *******************************/
Expand Down
2 changes: 0 additions & 2 deletions fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions fs/proc/kcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/linux-2.6/xfs_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b4cac1a

Please sign in to comment.