mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wang, Haiyue" <haiyue.wang@linux.intel.com>
To: minyard@acm.org, "Gustavo A. R. Silva" <garsilva@embeddedor.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data
Date: Fri, 16 Feb 2018 16:27:01 +0800	[thread overview]
Message-ID: <3b2c65e6-a8bd-9b6c-5b13-c1d80f546215@linux.intel.com> (raw)
In-Reply-To: <9098c6c8-83e5-5e1f-519b-68e14738c24a@acm.org>



On 2018-02-15 05:46, Corey Minyard wrote:
> On 02/14/2018 11:30 AM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>
> Thanks, queued for next release.
>
> -corey
>
>> Addresses-Coverity-ID: 1465255 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>> This code was compiled with GCC 7.3.0
>>
>>   drivers/char/ipmi/kcs_bmc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/char/ipmi/kcs_bmc.c b/drivers/char/ipmi/kcs_bmc.c
>> index 3a3498a..6476bfb 100644
>> --- a/drivers/char/ipmi/kcs_bmc.c
>> +++ b/drivers/char/ipmi/kcs_bmc.c
>> @@ -95,6 +95,7 @@ static void kcs_bmc_handle_data(struct kcs_bmc 
>> *kcs_bmc)
>>       switch (kcs_bmc->phase) {
>>       case KCS_PHASE_WRITE_START:
>>           kcs_bmc->phase = KCS_PHASE_WRITE_DATA;
>> +        /* fall through */
Thanks, Gustavo. I see many modules have '/* fall through */', but I 
thought it was a just C comment, I didn't
add it for making code clean. Learned it, thank you! :-)
>>         case KCS_PHASE_WRITE_DATA:
>>           if (kcs_bmc->data_in_idx < KCS_MSG_BUFSIZ) {
>
>

      parent reply	other threads:[~2018-02-16  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 17:30 Gustavo A. R. Silva
2018-02-14 21:46 ` Corey Minyard
2018-02-14 22:04   ` Gustavo A. R. Silva
2018-02-16  8:27   ` Wang, Haiyue [this message]

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=3b2c65e6-a8bd-9b6c-5b13-c1d80f546215@linux.intel.com \
    --to=haiyue.wang@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=garsilva@embeddedor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®