Skip to content

Commit 180e53a

Browse files
milindchoudharyLinus Torvalds
authored andcommitted
ROUND_UP macro cleanup in arch/alpha/kernel/osf_sys.c
ROUND_UP macro cleanup use ALIGN Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 97a572b commit 180e53a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/alpha/kernel/osf_sys.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ osf_set_program_attributes(unsigned long text_start, unsigned long text_len,
9393
* offset differences aren't the same as "d_reclen").
9494
*/
9595
#define NAME_OFFSET offsetof (struct osf_dirent, d_name)
96-
#define ROUND_UP(x) (((x)+3) & ~3)
9796

9897
struct osf_dirent {
9998
unsigned int d_ino;
@@ -115,7 +114,7 @@ osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
115114
{
116115
struct osf_dirent __user *dirent;
117116
struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
118-
unsigned int reclen = ROUND_UP(NAME_OFFSET + namlen + 1);
117+
unsigned int reclen = ALIGN(NAME_OFFSET + namlen + 1, sizeof(u32));
119118
unsigned int d_ino;
120119

121120
buf->error = -EINVAL; /* only used if we fail */
@@ -174,7 +173,6 @@ osf_getdirentries(unsigned int fd, struct osf_dirent __user *dirent,
174173
return error;
175174
}
176175

177-
#undef ROUND_UP
178176
#undef NAME_OFFSET
179177

180178
asmlinkage unsigned long

0 commit comments

Comments
 (0)