Re: [PATCH 099/117] ufs: Remove a local variable

Can Guo
2021-05-06T23:56:26Z

On 2021-04-20 10:13, Bart Van Assche wrote:
> A later patch will introduce a type with the name 'scsi_status'. Remove
> a local variable with the same name to prevent confusion. This patch
> does not change any functionality.
>
> Cc: Can Guo <cang@codeaurora.org>
> Cc: Avri Altman <avri.altman@wdc.com>
> Cc: Bean Huo <beanhuo@micron.com>
> Cc: Alim Akhtar <alim.akhtar@samsung.com>
> Cc: Asutosh Das <asutoshd@codeaurora.org>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/ufs/ufshcd.c | 17 ++++-------------
> 1 file changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index fa596cf66c23..0c2c18f2acf3 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4934,7 +4934,6 @@ static inline int
> ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb
> *lrbp)
> {
> int result = 0;
> - int scsi_status;
> int ocs;
>
> /* overall command status of utrd */
> @@ -4952,18 +4951,10 @@ ufshcd_transfer_rsp_status(struct ufs_hba
> *hba, struct ufshcd_lrb *lrbp)
> hba->ufs_stats.last_hibern8_exit_tstamp = ktime_set(0, 0);
> switch (result) {
> case UPIU_TRANSACTION_RESPONSE:
> - /*
> - * get the response UPIU result to extract
> - * the SCSI command status
> - */
> - result = ufshcd_get_rsp_upiu_result(lrbp->ucd_rsp_ptr);
> -
> - /*
> - * get the result based on SCSI status response
> - * to notify the SCSI midlayer of the command status
> - */
> - scsi_status = result & MASK_SCSI_STATUS;
> - result = ufshcd_scsi_cmd_status(lrbp, scsi_status);
> + /* Propagate the SCSI status to the SCSI midlayer. */
> + result = ufshcd_scsi_cmd_status(lrbp,
> + ufshcd_get_rsp_upiu_result(lrbp->ucd_rsp_ptr) &
> + MASK_SCSI_STATUS);
>
> /*
> * Currently we are only supporting BKOPs exception

Reviewed-by: Can Guo <cang@codeaurora.org>