Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] watchdog/sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning
@ 2019-09-29 11:46 Borislav Petkov
  2019-09-30 13:13 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2019-09-29 11:46 UTC (permalink / raw)
  To: LKML; +Cc: Wim Van Sebroeck, Guenter Roeck, linux-watchdog

From: Borislav Petkov <bp@suse.de>

... by moving the fall through comment outside of the code block so that
gcc sees it.

No functional changes.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
---
 drivers/watchdog/sbc7240_wdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/watchdog/sbc7240_wdt.c b/drivers/watchdog/sbc7240_wdt.c
index 12cdee7d5069..90d67e6d8e8b 100644
--- a/drivers/watchdog/sbc7240_wdt.c
+++ b/drivers/watchdog/sbc7240_wdt.c
@@ -194,9 +194,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 		if (wdt_set_timeout(new_timeout))
 			return -EINVAL;
-
-		/* Fall through */
 	}
+	/* Fall through */
 	case WDIOC_GETTIMEOUT:
 		return put_user(timeout, (int __user *)arg);
 	default:
-- 
2.21.0


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

* Re: [PATCH] watchdog/sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning
  2019-09-29 11:46 [PATCH] watchdog/sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning Borislav Petkov
@ 2019-09-30 13:13 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-09-30 13:13 UTC (permalink / raw)
  To: Borislav Petkov, LKML; +Cc: Wim Van Sebroeck, linux-watchdog

On 9/29/19 4:46 AM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> ... by moving the fall through comment outside of the code block so that
> gcc sees it.
> 
> No functional changes.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-watchdog@vger.kernel.org

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

> ---
>   drivers/watchdog/sbc7240_wdt.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sbc7240_wdt.c b/drivers/watchdog/sbc7240_wdt.c
> index 12cdee7d5069..90d67e6d8e8b 100644
> --- a/drivers/watchdog/sbc7240_wdt.c
> +++ b/drivers/watchdog/sbc7240_wdt.c
> @@ -194,9 +194,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>   
>   		if (wdt_set_timeout(new_timeout))
>   			return -EINVAL;
> -
> -		/* Fall through */
>   	}
> +	/* Fall through */
>   	case WDIOC_GETTIMEOUT:
>   		return put_user(timeout, (int __user *)arg);
>   	default:
> 


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-29 11:46 [PATCH] watchdog/sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning Borislav Petkov
2019-09-30 13:13 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org linux-watchdog@archiver.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/ public-inbox