[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq1imwvzyub.fsf@oracle.com>
Date: Wed, 06 Mar 2019 12:39:40 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Finn Thain <fthain@...egraphics.com.au>
Cc: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Michael Schmitz <schmitzmic@...il.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v2] scsi: NCR5380: Mark expected switch fall-through
Hi Finn,
Please submit this as a formal patch. Thanks!
> Here's an alternative patch, which has the virtue that a simple heuristic
> will work. This patch does not require that other static analysis tools
> will follow gcc's weird rules about hyphens. (I assume they don't but I
> didn't check.)
>
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
> index 7fed9bb72784..fe0535affc14 100644
> --- a/drivers/scsi/NCR5380.c
> +++ b/drivers/scsi/NCR5380.c
> @@ -1932,13 +1932,13 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
> if (!hostdata->connected)
> return;
>
> - /* Fall through to reject message */
> -
> + /* Reject message */
> + /* Fall through */
> + default:
> /*
> * If we get something weird that we aren't expecting,
> - * reject it.
> + * log it.
> */
> - default:
> if (tmp == EXTENDED_MESSAGE)
> scmd_printk(KERN_INFO, cmd,
> "rejecting unknown extended message code %02x, length %d\n",
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists