aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/osf_sys.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 67ae41dcb6fa..ea405f5713ce 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -93,7 +93,6 @@ osf_set_program_attributes(unsigned long text_start, unsigned long text_len,
93 * offset differences aren't the same as "d_reclen"). 93 * offset differences aren't the same as "d_reclen").
94 */ 94 */
95#define NAME_OFFSET offsetof (struct osf_dirent, d_name) 95#define NAME_OFFSET offsetof (struct osf_dirent, d_name)
96#define ROUND_UP(x) (((x)+3) & ~3)
97 96
98struct osf_dirent { 97struct osf_dirent {
99 unsigned int d_ino; 98 unsigned int d_ino;
@@ -115,7 +114,7 @@ osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
115{ 114{
116 struct osf_dirent __user *dirent; 115 struct osf_dirent __user *dirent;
117 struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf; 116 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));
119 unsigned int d_ino; 118 unsigned int d_ino;
120 119
121 buf->error = -EINVAL; /* only used if we fail */ 120 buf->error = -EINVAL; /* only used if we fail */
@@ -174,7 +173,6 @@ osf_getdirentries(unsigned int fd, struct osf_dirent __user *dirent,
174 return error; 173 return error;
175} 174}
176 175
177#undef ROUND_UP
178#undef NAME_OFFSET 176#undef NAME_OFFSET
179 177
180asmlinkage unsigned long 178asmlinkage unsigned long