All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: wdt285: Fix variable type
@ 2014-02-15  9:23 Alexander Shiyan
  2014-02-15 17:53 ` Guenter Roeck
  2014-02-24 20:00 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2014-02-15  9:23 UTC (permalink / raw)
  To: linux-watchdog; +Cc: Wim Van Sebroeck, Alexander Shiyan

Variable "new_margin" is checked in the function watchdog_ioctl()
to be positive, so change its type to "int".

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/watchdog/wdt285.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c
index 7355ddd0..ebbb183 100644
--- a/drivers/watchdog/wdt285.c
+++ b/drivers/watchdog/wdt285.c
@@ -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:
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: wdt285: Fix variable type
  2014-02-15  9:23 [PATCH] watchdog: wdt285: Fix variable type Alexander Shiyan
@ 2014-02-15 17:53 ` Guenter Roeck
  2014-02-24 20:00 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2014-02-15 17:53 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-watchdog, Wim Van Sebroeck

On Sat, Feb 15, 2014 at 01:23:25PM +0400, Alexander Shiyan wrote:
> Variable "new_margin" is checked in the function watchdog_ioctl()
> to be positive, so change its type to "int".

non-negative, really.

Other than that,

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/watchdog/wdt285.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c
> index 7355ddd0..ebbb183 100644
> --- a/drivers/watchdog/wdt285.c
> +++ b/drivers/watchdog/wdt285.c
> @@ -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:
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: wdt285: Fix variable type
  2014-02-15  9:23 [PATCH] watchdog: wdt285: Fix variable type Alexander Shiyan
  2014-02-15 17:53 ` Guenter Roeck
@ 2014-02-24 20:00 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2014-02-24 20:00 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-watchdog

Hi Alexander,

> Variable "new_margin" is checked in the function watchdog_ioctl()
> to be positive, so change its type to "int".
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/watchdog/wdt285.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c
> index 7355ddd0..ebbb183 100644
> --- a/drivers/watchdog/wdt285.c
> +++ b/drivers/watchdog/wdt285.c
> @@ -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:
> -- 
> 1.8.3.2
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-24 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15  9:23 [PATCH] watchdog: wdt285: Fix variable type Alexander Shiyan
2014-02-15 17:53 ` Guenter Roeck
2014-02-24 20:00 ` Wim Van Sebroeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.