diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-04 19:12:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:19 -0400 |
commit | 6516a466193fe7f72644d65467fb9905139228c3 (patch) | |
tree | 06042186ca4b063b9300443cd7f98c6c055e6021 | |
parent | 548bbff9818c7ddd325b47face1c9bf9a53ad0c7 (diff) |
kernel/compat.c: use sizeof() instead of sizeof
Fix 4 checkpatch warnings
WARNING: sizeof *tv should be sizeof(*tv)
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/compat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index e40b0430b562..633394f442f8 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -157,7 +157,7 @@ static int __compat_put_timespec(const struct timespec *ts, struct compat_timesp | |||
157 | int compat_get_timeval(struct timeval *tv, const void __user *utv) | 157 | int compat_get_timeval(struct timeval *tv, const void __user *utv) |
158 | { | 158 | { |
159 | if (COMPAT_USE_64BIT_TIME) | 159 | if (COMPAT_USE_64BIT_TIME) |
160 | return copy_from_user(tv, utv, sizeof *tv) ? -EFAULT : 0; | 160 | return copy_from_user(tv, utv, sizeof(*tv)) ? -EFAULT : 0; |
161 | else | 161 | else |
162 | return __compat_get_timeval(tv, utv); | 162 | return __compat_get_timeval(tv, utv); |
163 | } | 163 | } |
@@ -166,7 +166,7 @@ EXPORT_SYMBOL_GPL(compat_get_timeval); | |||
166 | int compat_put_timeval(const struct timeval *tv, void __user *utv) | 166 | int compat_put_timeval(const struct timeval *tv, void __user *utv) |
167 | { | 167 | { |
168 | if (COMPAT_USE_64BIT_TIME) | 168 | if (COMPAT_USE_64BIT_TIME) |
169 | return copy_to_user(utv, tv, sizeof *tv) ? -EFAULT : 0; | 169 | return copy_to_user(utv, tv, sizeof(*tv)) ? -EFAULT : 0; |
170 | else | 170 | else |
171 | return __compat_put_timeval(tv, utv); | 171 | return __compat_put_timeval(tv, utv); |
172 | } | 172 | } |
@@ -175,7 +175,7 @@ EXPORT_SYMBOL_GPL(compat_put_timeval); | |||
175 | int compat_get_timespec(struct timespec *ts, const void __user *uts) | 175 | int compat_get_timespec(struct timespec *ts, const void __user *uts) |
176 | { | 176 | { |
177 | if (COMPAT_USE_64BIT_TIME) | 177 | if (COMPAT_USE_64BIT_TIME) |
178 | return copy_from_user(ts, uts, sizeof *ts) ? -EFAULT : 0; | 178 | return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; |
179 | else | 179 | else |
180 | return __compat_get_timespec(ts, uts); | 180 | return __compat_get_timespec(ts, uts); |
181 | } | 181 | } |
@@ -184,7 +184,7 @@ EXPORT_SYMBOL_GPL(compat_get_timespec); | |||
184 | int compat_put_timespec(const struct timespec *ts, void __user *uts) | 184 | int compat_put_timespec(const struct timespec *ts, void __user *uts) |
185 | { | 185 | { |
186 | if (COMPAT_USE_64BIT_TIME) | 186 | if (COMPAT_USE_64BIT_TIME) |
187 | return copy_to_user(uts, ts, sizeof *ts) ? -EFAULT : 0; | 187 | return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0; |
188 | else | 188 | else |
189 | return __compat_put_timespec(ts, uts); | 189 | return __compat_put_timespec(ts, uts); |
190 | } | 190 | } |