[PATCH] m68k: rtc __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Al Viro and committed by Linus Torvalds 1b7bb54a 2382f77f

+6 -6
+3 -3
arch/m68k/bvme6000/rtc.c
··· 47 47 unsigned char msr; 48 48 unsigned long flags; 49 49 struct rtc_time wtime; 50 + void __user *argp = (void __user *)arg; 50 51 51 52 switch (cmd) { 52 53 case RTC_RD_TIME: /* Read the time/date from RTC */ ··· 70 69 } while (wtime.tm_sec != BCD2BIN(rtc->bcd_sec)); 71 70 rtc->msr = msr; 72 71 local_irq_restore(flags); 73 - return copy_to_user((void *)arg, &wtime, sizeof wtime) ? 72 + return copy_to_user(argp, &wtime, sizeof wtime) ? 74 73 -EFAULT : 0; 75 74 } 76 75 case RTC_SET_TIME: /* Set the RTC */ ··· 82 81 if (!capable(CAP_SYS_ADMIN)) 83 82 return -EACCES; 84 83 85 - if (copy_from_user(&rtc_tm, (struct rtc_time*)arg, 86 - sizeof(struct rtc_time))) 84 + if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) 87 85 return -EFAULT; 88 86 89 87 yrs = rtc_tm.tm_year;
+3 -3
arch/m68k/mvme16x/rtc.c
··· 45 45 volatile MK48T08ptr_t rtc = (MK48T08ptr_t)MVME_RTC_BASE; 46 46 unsigned long flags; 47 47 struct rtc_time wtime; 48 + void __user *argp = (void __user *)arg; 48 49 49 50 switch (cmd) { 50 51 case RTC_RD_TIME: /* Read the time/date from RTC */ ··· 65 64 wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1; 66 65 rtc->ctrl = 0; 67 66 local_irq_restore(flags); 68 - return copy_to_user((void *)arg, &wtime, sizeof wtime) ? 67 + return copy_to_user(argp, &wtime, sizeof wtime) ? 69 68 -EFAULT : 0; 70 69 } 71 70 case RTC_SET_TIME: /* Set the RTC */ ··· 77 76 if (!capable(CAP_SYS_ADMIN)) 78 77 return -EACCES; 79 78 80 - if (copy_from_user(&rtc_tm, (struct rtc_time*)arg, 81 - sizeof(struct rtc_time))) 79 + if (copy_from_user(&rtc_tm, argp, sizeof(struct rtc_time))) 82 80 return -EFAULT; 83 81 84 82 yrs = rtc_tm.tm_year;