From: Guenter Roeck <linux@roeck-us.net>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
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 10:28:13 -0700 [thread overview]
Message-ID: <20190424172813.GA29860@roeck-us.net> (raw)
In-Reply-To: <c2e13a6d-0701-414b-ff1d-70e358fc2786@embeddedor.com>
On Wed, Apr 24, 2019 at 12:01:03PM -0500, Gustavo A. R. Silva wrote:
> Hi Guenter,
>
> I wonder if you took this in you watchdog-next branch.
>
It is in branch watchdog-next of
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
waiting for Wim to pick it up.
Guenter
> 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
> >>>
next prev parent reply other threads:[~2019-04-24 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 18:49 [PATCH] watchdog: machzwd: Mark expected switch fall-through 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
2019-04-24 17:28 ` Guenter Roeck [this message]
2019-04-24 17:36 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly 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=20190424172813.GA29860@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).