watchdog: wdt285: Fix variable type
PATCH 1/1 watchdog: wdt285: Fix variable type
Variable "new_margin" is checked in the function watchdog_ioctl() to be positive, so change its type to "int".
Signed-off-by Alexander Shiyan <[email protected]>
--- drivers/watchdog/wdt285.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/wdt285.c +1 -2
@@ -139,9 +139,8 @@ static const struct watchdog_info ident = {static long watchdog_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { -unsigned int new_margin;int __user *int_arg = (int __user *)arg; -int ret = -ENOTTY ; +int new_margin, ret = -ENOTTY ;switch (cmd) {case WDIOC_GETSUPPORT :
Signature · 1 line
1.8.3.2
Quoted 2 lines · Alexander Shiyan
Variable "
new_margin" is checked in the functionwatchdog_ioctl()to be positive, so change its type to "int".
non-negative, really.
Other than that,
Reviewed-by Guenter Roeck <[email protected]>
Quoted 29 lines
Signed-off-by Alexander Shiyan <[email protected]>--- drivers/watchdog/wdt285.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/watchdog/wdt285.c +1
-2@@ -139,9 +139,8 @@ static const struct watchdog_info ident = {static long watchdog_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { -unsigned int new_margin;int __user *int_arg = (int __user *)arg; -int ret = -ENOTTY ; +int new_margin, ret = -ENOTTY ;switch (cmd) {case WDIOC_GETSUPPORT :Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Alexander,
Quoted 26 lines
Variable "
new_margin" is checked in the functionwatchdog_ioctl()to be positive, so change its type to "int".Signed-off-by Alexander Shiyan <[email protected]>--- drivers/watchdog/wdt285.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/watchdog/wdt285.c +1
-2@@ -139,9 +139,8 @@ static const struct watchdog_info ident = {static long watchdog_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { -unsigned int new_margin;int __user *int_arg = (int __user *)arg; -int ret = -ENOTTY ; +int new_margin, ret = -ENOTTY ;switch (cmd) {case WDIOC_GETSUPPORT :Signature · 1 line
1.8.3.2
This patch has been added to linux-watchdog-next.
Kind regards,
Wim.