LKML Archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Wei Ming Chen <jj251510319013@gmail.com>, <linux-kernel@vger.kernel.org>
Cc: <linux-scsi@vger.kernel.org>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>,
	"Gustavo A. R. Silva" <gustavo@embeddeodr.com>
Subject: Re: [PATCH] scsi: libsas: Use fallthrough pseudo-keyword
Date: Tue, 1 Jun 2021 09:16:49 +0100	[thread overview]
Message-ID: <287b6910-17e8-9ef7-0042-9b525259967e@huawei.com> (raw)
In-Reply-To: <20210531153724.3149-1-jj251510319013@gmail.com>

+ Gustavo

On 31/05/2021 16:37, Wei Ming Chen wrote:
> Replace /* Fall through */ comment with pseudo-keyword macro fallthrough[1]
> 
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
> 
> Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
> ---
>   drivers/scsi/libsas/sas_discover.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
> index 9f5068f3bcfb..dd205414e505 100644
> --- a/drivers/scsi/libsas/sas_discover.c
> +++ b/drivers/scsi/libsas/sas_discover.c
> @@ -461,7 +461,7 @@ static void sas_discover_domain(struct work_struct *work)
>   		break;
>   #else
>   		pr_notice("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n");
> -		/* Fall through */
> +		fallthrough;

I don't know why we need the 2nd fall through (and the compiler can't 
see the first one) - added by Gustavo in da1fb2909 - but I think that 
this one can now simply be removed.

>   #endif
>   		/* Fall through - only for the #else condition above. */
Thanks,
John

>   	default:
> 


  reply	other threads:[~2021-06-01  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 15:37 [PATCH] scsi: libsas: Use fallthrough pseudo-keyword Wei Ming Chen
2021-06-01  8:16 ` John Garry [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-09 15:00 Wei Ming Chen

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=287b6910-17e8-9ef7-0042-9b525259967e@huawei.com \
    --to=john.garry@huawei.com \
    --cc=gustavo@embeddeodr.com \
    --cc=jejb@linux.ibm.com \
    --cc=jj251510319013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).