Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] watchdog: machzwd: Mark expected switch fall-through
Date: Wed, 24 Apr 2019 12:01:03 -0500
Message-ID: <c2e13a6d-0701-414b-ff1d-70e358fc2786@embeddedor.com> (raw)
In-Reply-To: <707a1c55-c185-1227-0a65-136f3bf27617@embeddedor.com>

Hi Guenter,

I wonder if you took this in you watchdog-next branch.

Thanks
--
Gustavo

On 4/10/19 3:51 PM, Gustavo A. R. Silva wrote:
> 
> 
> On 4/10/19 3:35 PM, Guenter Roeck wrote:
>> On Wed, Apr 10, 2019 at 01:49:05PM -0500, Gustavo A. R. Silva wrote:
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>>> cases where we are expecting to fall through.
>>>
>>> This patch fixes the following warnings:
>>>
>>> drivers/watchdog/machzwd.c: In function ‘zf_set_timer’:
>>> ./arch/x86/include/asm/io.h:355:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>>  #define outw outw
>>> drivers/watchdog/machzwd.c:80:53: note: in expansion of macro ‘outw’
>>>  #define zf_writew(port, data)  { outb(port, INDEX); outw(data, DATA_W); }
>>>                                                      ^~~~
>>> drivers/watchdog/machzwd.c:179:3: note: in expansion of macro ‘zf_writew’
>>>    zf_writew(COUNTER_1, new);
>>>    ^~~~~~~~~
>>> drivers/watchdog/machzwd.c:180:2: note: here
>>>   case WD2:
>>>   ^~~~
>>>
>>> Warning level 3 was used: -Wimplicit-fallthrough=3
>>>
>>> This patch is part of the ongoing efforts to enable
>>> -Wimplicit-fallthrough.
>>>
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>
>> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
>>
> 
> Thank you, Guenter.
> --
> Gustavo
> 
>>> ---
>>>  drivers/watchdog/machzwd.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
>>> index 88d823d87a4b..108928dbc754 100644
>>> --- a/drivers/watchdog/machzwd.c
>>> +++ b/drivers/watchdog/machzwd.c
>>> @@ -177,6 +177,7 @@ static inline void zf_set_timer(unsigned short new, unsigned char n)
>>>  	switch (n) {
>>>  	case WD1:
>>>  		zf_writew(COUNTER_1, new);
>>> +		/* fall through */
>>>  	case WD2:
>>>  		zf_writeb(COUNTER_2, new > 0xff ? 0xff : new);
>>>  	default:
>>> -- 
>>> 2.21.0
>>>

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 18:49 Gustavo A. R. Silva
2019-04-10 20:35 ` Guenter Roeck
2019-04-10 20:51   ` Gustavo A. R. Silva
2019-04-24 17:01     ` Gustavo A. R. Silva [this message]
2019-04-24 17:28       ` Guenter Roeck
2019-04-24 17:36         ` Gustavo A. R. Silva

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2e13a6d-0701-414b-ff1d-70e358fc2786@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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
	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.git