From: Nathan Chancellor <nathan@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: pkshih@realtek.com, kvalo@kernel.org, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, ndesaulniers@google.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] rtw89: ser: add a break statement
Date: Thu, 7 Apr 2022 11:01:38 -0700 [thread overview]
Message-ID: <Yk8nAnDcnPF5rC7N@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20220407175349.3053362-1-trix@redhat.com>
On Thu, Apr 07, 2022 at 01:53:49PM -0400, Tom Rix wrote:
> The clang build fails with
> ser.c:397:2: error: unannotated fall-through
> between switch labels [-Werror,-Wimplicit-fallthrough]
> default:
> ^
> The case above the default does not have a break.
> So add one.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
There is also https://lore.kernel.org/r/20220407132316.61132-2-pkshih@realtek.com/.
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
I have been using Documentation/process/deprecated.rst as justification
for the extra break, warning aside, as all case statements must end in
one of the following:
break
fallthrough
continue
goto
return
> ---
> drivers/net/wireless/realtek/rtw89/ser.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c
> index 25d1df10f226..5aebd6839d29 100644
> --- a/drivers/net/wireless/realtek/rtw89/ser.c
> +++ b/drivers/net/wireless/realtek/rtw89/ser.c
> @@ -394,6 +394,7 @@ static void ser_idle_st_hdl(struct rtw89_ser *ser, u8 evt)
> break;
> case SER_EV_STATE_OUT:
> rtw89_hci_recovery_start(rtwdev);
> + break;
> default:
> break;
> }
> --
> 2.27.0
>
next prev parent reply other threads:[~2022-04-07 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 17:53 [PATCH] rtw89: ser: add a break statement Tom Rix
2022-04-07 18:01 ` Nathan Chancellor [this message]
2022-04-12 13:37 ` Kalle Valo
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=Yk8nAnDcnPF5rC7N@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pkshih@realtek.com \
--cc=trix@redhat.com \
/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