Re: [PATCH 101/117] ufs: Remove an assignment from ufshcd_transfer_rsp_status()

Can Guo
2021-05-07T00:03:32Z

On 2021-04-20 10:13, Bart Van Assche wrote:
> Since a later patch will change the type of the 'result' variable, use
> this
> variable only for one purpose.
>
> 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 | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 391947e4db72..d966d80838fb 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4947,9 +4947,8 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba,
> struct ufshcd_lrb *lrbp)
>
> switch (ocs) {
> case OCS_SUCCESS:
> - result = ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr);
> hba->ufs_stats.last_hibern8_exit_tstamp = ktime_set(0, 0);
> - switch (result) {
> + switch (ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr)) {
> case UPIU_TRANSACTION_RESPONSE:
> /* Propagate the SCSI status to the SCSI midlayer. */
> result = ufshcd_scsi_cmd_status(lrbp,

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