From: Keoseong Park <keosung.park@samsung.com>
To: ALIM AKHTAR <alim.akhtar@samsung.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
"quic_asutoshd@quicinc.com" <quic_asutoshd@quicinc.com>,
"beanhuo@micron.com" <beanhuo@micron.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] scsi: ufs: core: Simplify param_set_mcq_mode()
Date: Wed, 26 Apr 2023 14:21:53 +0900 [thread overview]
Message-ID: <20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2> (raw)
In-Reply-To: <CGME20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2>
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@samsung.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
next parent reply other threads:[~2023-04-26 5:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2>
2023-04-26 5:21 ` Keoseong Park [this message]
2023-04-26 8:08 ` Stanley Chu
2023-04-26 12:51 ` Avri Altman
2023-04-26 16:44 ` Bart Van Assche
2023-04-27 8:45 ` Keoseong Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230426052153epcms2p27d64a865f15bfd452d564f77d63605db@epcms2p2 \
--to=keosung.park@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®