watchdog: sbc_fitpc2_wdt: add __user annotations
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Sun, 25 Oct 2020 12:45:18 +0000 (13:45 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 13 Dec 2020 15:17:41 +0000 (16:17 +0100)
commit347755d2a88e54e7462be23f1e1a1018d9be4a4b
treee4ccd100ca4fdf8f1c0e96df404a2508eda66648
parent9747f12b5be9f55bfba72a82b619355cd861bdfe
watchdog: sbc_fitpc2_wdt: add __user annotations

After a change to the put_user() macro on x86, kernel test robot has
started sending me complaints (from sparse) about passing kernel
pointers to put_user(). So add the __user annotations to the various
casts in fitpc2_wdt_ioctl(), and while in here, also make the write
method actually match the prototype of file_operations::write.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Guenter Roeck <inux@roeck-us.net>
Link: https://lore.kernel.org/r/20201025124518.31647-1-linux@rasmusvillemoes.dk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/sbc_fitpc2_wdt.c