[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2>
Date: Wed, 26 Apr 2023 14:21:53 +0900
From: Keoseong Park <keosung.park@...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>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] scsi: ufs: core: Simplify param_set_mcq_mode()
This function does not require the "ret" variable because it returns
only the result of param_set_bool().
Remove unnecessary "ret" variable and simplify the code.
Signed-off-by: Keoseong Park <keosung.park@...sung.com>
---
drivers/ufs/core/ufshcd.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9434328ba323..46c4ed478ad0 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -108,13 +108,7 @@ static bool is_mcq_supported(struct ufs_hba *hba)
static int param_set_mcq_mode(const char *val, const struct kernel_param *kp)
{
- int ret;
-
- ret = param_set_bool(val, kp);
- if (ret)
- return ret;
-
- return 0;
+ return param_set_bool(val, kp);
}
static const struct kernel_param_ops mcq_mode_ops = {
--
2.17.1
Powered by blists - more mailing lists