From e729d83fe68fd388352dcb26cfc6fcdb8147b1f3 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 6 Mar 2004 08:49:01 -0800 Subject: [PATCH] fix put_compat_timespec prototype From: Arnd Bergmann The wrong argument in put_compat_timespec is marked const, causing unnecessary compiler warnings. --- include/linux/compat.h | 2 +- kernel/compat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/compat.h b/include/linux/compat.h index b287477fe206..0fbfb6152d20 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -45,7 +45,7 @@ typedef struct { extern int cp_compat_stat(struct kstat *, struct compat_stat *); extern int get_compat_timespec(struct timespec *, const struct compat_timespec *); -extern int put_compat_timespec(struct timespec *, const struct compat_timespec *); +extern int put_compat_timespec(const struct timespec *, struct compat_timespec *); struct compat_iovec { compat_uptr_t iov_base; diff --git a/kernel/compat.c b/kernel/compat.c index f69dcd644a22..f05cda344b4d 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -30,7 +30,7 @@ int get_compat_timespec(struct timespec *ts, const struct compat_timespec *cts) __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; } -int put_compat_timespec(struct timespec *ts, const struct compat_timespec *cts) +int put_compat_timespec(const struct timespec *ts, struct compat_timespec *cts) { return (verify_area(VERIFY_WRITE, cts, sizeof(*cts)) || __put_user(ts->tv_sec, &cts->tv_sec) || -- cgit v1.2.3