[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220728062112epcms2p8caabb4288c426b9b7641a7e867c50af3@epcms2p8>
Date: Thu, 28 Jul 2022 15:21:12 +0900
From: Jinyoung CHOI <j-young.choi@...sung.com>
To: ALIM AKHTAR <alim.akhtar@...sung.com>,
"avri.altman@....com" <avri.altman@....com>,
"bvanassche@....org" <bvanassche@....org>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE:(2) [PATCH v4 1/7] scsi: ufs: wb: Move ufshcd_is_wb_allowed() to
callee
>On Wed, 2022-07-27 at 16:04 +0900, Jinyoung CHOI wrote:
>> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
>> index 8f11f118c30e..a3bdf9986511 100644
>> --- a/drivers/ufs/core/ufshcd.c
>> +++ b/drivers/ufs/core/ufshcd.c
>> @@ -5722,6 +5722,9 @@ static int __ufshcd_wb_toggle(struct ufs_hba
>> *hba, bool set, enum flag_idn idn)
>> enum query_opcode opcode = set ? UPIU_QUERY_OPCODE_SET_FLAG :
>> UPIU_QUERY_OPCODE_CLEAR_FLAG;
>>
>> + if (!ufshcd_is_wb_allowed(hba))
>> + return -EPERM;
>> +
>Hi J-young,
>
>here you should change its return, Otherwise, there will be an fake
>error printing:
>
> dev_err(hba->dev, "%s Write Booster %s failed %d\n",
> __func__, enable ? "enable" : "disable", ret);
>
>
>Kind regards,
>Bean
You are right!
Rather than changing the return value, this patch is likely to be excluded
because caller can continue unnecessary work.
Thanks, Jinyoung.
Powered by blists - more mailing lists