[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB65755981B606ECC00D1F198BFCF19@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Wed, 4 Aug 2021 06:38:32 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bean Huo <huobean@...il.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"bvanassche@....org" <bvanassche@....org>,
"cang@...eaurora.org" <cang@...eaurora.org>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs: Remove useless if-state in
ufshcd_add_command_trace
>
> From: Bean Huo <beanhuo@...ron.com>
>
> ufshcd_add_cmd_upiu_trace() will be called anyway, so move if-state down,
> make code simpler.
>
> Signed-off-by: Bean Huo <beanhuo@...ron.com>
Reviewed-by: Avri Altman <avri.altman@....com>
> ---
> drivers/scsi/ufs/ufshcd.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
> 064a44e628d6..02f54153fd6d 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -380,14 +380,11 @@ static void ufshcd_add_command_trace(struct
> ufs_hba *hba, unsigned int tag,
> if (!cmd)
> return;
>
> - if (!trace_ufshcd_command_enabled()) {
> - /* trace UPIU W/O tracing command */
> - ufshcd_add_cmd_upiu_trace(hba, tag, str_t);
> - return;
> - }
> -
> /* trace UPIU also */
> ufshcd_add_cmd_upiu_trace(hba, tag, str_t);
> + if (!trace_ufshcd_command_enabled())
> + return;
> +
> opcode = cmd->cmnd[0];
> lba = scsi_get_lba(cmd);
>
> --
> 2.25.1
Powered by blists - more mailing lists