All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Michael Schmitz <schmitzmic@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] scsi: NCR5380: Mark expected switch fall-through
Date: Wed, 06 Mar 2019 12:39:40 -0500	[thread overview]
Message-ID: <yq1imwvzyub.fsf@oracle.com> (raw)
In-Reply-To: <alpine.LNX.2.21.1903011143550.8@nippy.intranet> (Finn Thain's message of "Fri, 1 Mar 2019 12:16:57 +1100 (AEDT)")


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

      parent reply	other threads:[~2019-03-06 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 20:27 [PATCH v2] scsi: NCR5380: Mark expected switch fall-through Gustavo A. R. Silva
2019-03-01  1:16 ` Finn Thain
2019-03-01  1:32   ` Michael Schmitz
2019-03-06 17:39   ` Martin K. Petersen [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=yq1imwvzyub.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=fthain@telegraphics.com.au \
    --cc=gustavo@embeddedor.com \
    --cc=jejb@linux.ibm.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schmitzmic@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.