mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "wubo (T)" <wubo40@huawei.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Mingfangsen <mingfangsen@huawei.com>
Subject: Re: [PATCH] scsi:remove unreachable code on scsi_decide_disposition func
Date: Tue, 17 Dec 2019 07:05:47 -0800	[thread overview]
Message-ID: <613e2596-07cc-aca9-2c7b-b0a0563353a1@acm.org> (raw)
In-Reply-To: <EDBAAA0BBBA2AC4E9C8B6B81DEEE1D6915E9A7FD@dggeml505-mbx.china.huawei.com>

On 2019-12-17 03:53, wubo (T) wrote:
> From: Wu Bo <wubo40@huawei.com>
> 
> Remove unreachable code on scsi_decide_disposition func.
> 
> Signed-off-by: Wu Bo <wubo40@huawei.com>
> ---
>  drivers/scsi/scsi_error.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index ae2fa17..c5e05c4 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -1934,7 +1934,6 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
>         default:
>                 return FAILED;
>         }
> -       return FAILED;
> 
>  maybe_retry:

I'm not sure it's worth to address this issue. If
scsi_decide_disposition() is changed I prefer to remove the "default:
return FAILED;" code because compilers can provide more useful
diagnostics about switch/case statements that do not have a default
statement, especially if the "switch" applies to a value with
enumeration type.

Bart.

      reply	other threads:[~2019-12-17 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 11:53 wubo (T)
2019-12-17 15:05 ` Bart Van Assche [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=613e2596-07cc-aca9-2c7b-b0a0563353a1@acm.org \
    --to=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mingfangsen@huawei.com \
    --cc=wubo40@huawei.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

all inboxes | Powered by JetHome®