[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <613e2596-07cc-aca9-2c7b-b0a0563353a1@acm.org>
Date: Tue, 17 Dec 2019 07:05:47 -0800
From: Bart Van Assche <bvanassche@....org>
To: "wubo (T)" <wubo40@...wei.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: Mingfangsen <mingfangsen@...wei.com>
Subject: Re: [PATCH] scsi:remove unreachable code on scsi_decide_disposition
func
On 2019-12-17 03:53, wubo (T) wrote:
> From: Wu Bo <wubo40@...wei.com>
>
> Remove unreachable code on scsi_decide_disposition func.
>
> Signed-off-by: Wu Bo <wubo40@...wei.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.
Powered by blists - more mailing lists