fix put_compat_timespec prototype
PATCH 1/1 fix put_compat_timespec prototype
The wrong argument in put_compat_timespec is marked const, causing unnecessary compiler warnings.
===== include/linux/compat.h 1.18 vs edited =====
include/linux/compat.h +1 -1
@@ -57,7 +57,7 @@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;
===== kernel/compat.c 1.25 vs edited =====
kernel/compat.c +1 -1
@@ -30,7 +30,7 @@ __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) ||