mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
       [not found] <CGME20230427094420epcms2p1043333a3e0c0cf58e66164e0b83b3b02@epcms2p1>
@ 2023-04-27  9:44 ` Keoseong Park
  2023-05-01 17:29   ` Bart Van Assche
                     ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Keoseong Park @ 2023-04-27  9:44 UTC (permalink / raw)
  To: ALIM AKHTAR, avri.altman, bvanassche, jejb, martin.petersen,
	stanley.chu, mani, quic_asutoshd, beanhuo, linux-scsi,
	linux-kernel

mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
module_param_cb() to module_param() and remove the mcq_mode_ops.

Signed-off-by: Keoseong Park <keosung.park@samsung.com>
---
 drivers/ufs/core/ufshcd.c | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9434328ba323..4ae92e8883b3 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -98,7 +98,7 @@
 /* Polling time to wait for fDeviceInit */
 #define FDEVICEINIT_COMPL_TIMEOUT 1500 /* millisecs */
 
-/* UFSHC 4.0 compliant HC support this mode, refer param_set_mcq_mode() */
+/* UFSHC 4.0 compliant HC support this mode. */
 static bool use_mcq_mode = true;
 
 static bool is_mcq_supported(struct ufs_hba *hba)
@@ -106,23 +106,7 @@ static bool is_mcq_supported(struct ufs_hba *hba)
 	return hba->mcq_sup && use_mcq_mode;
 }
 
-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;
-}
-
-static const struct kernel_param_ops mcq_mode_ops = {
-	.set = param_set_mcq_mode,
-	.get = param_get_bool,
-};
-
-module_param_cb(use_mcq_mode, &mcq_mode_ops, &use_mcq_mode, 0644);
+module_param(use_mcq_mode, bool, 0644);
 MODULE_PARM_DESC(use_mcq_mode, "Control MCQ mode for controllers starting from UFSHCI 4.0. 1 - enable MCQ, 0 - disable MCQ. MCQ is enabled by default");
 
 #define ufshcd_toggle_vreg(_dev, _vreg, _on)				\
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
  2023-04-27  9:44 ` [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode Keoseong Park
@ 2023-05-01 17:29   ` Bart Van Assche
  2023-05-03  5:10   ` Stanley Chu
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2023-05-01 17:29 UTC (permalink / raw)
  To: keosung.park, ALIM AKHTAR, avri.altman, jejb, martin.petersen,
	stanley.chu, mani, quic_asutoshd, beanhuo, linux-scsi,
	linux-kernel

On 4/27/23 02:44, Keoseong Park wrote:
> mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
> module_param_cb() to module_param() and remove the mcq_mode_ops.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
  2023-04-27  9:44 ` [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode Keoseong Park
  2023-05-01 17:29   ` Bart Van Assche
@ 2023-05-03  5:10   ` Stanley Chu
  2023-05-06 22:29   ` Martin K. Petersen
  2023-05-17  2:12   ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Stanley Chu @ 2023-05-03  5:10 UTC (permalink / raw)
  To: keosung.park
  Cc: ALIM AKHTAR, avri.altman, bvanassche, jejb, martin.petersen,
	stanley.chu, mani, quic_asutoshd, beanhuo, linux-scsi,
	linux-kernel

Keoseong Park <keosung.park@samsung.com> 於 2023年4月27日 週四 下午5:48寫道:
>
> mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
> module_param_cb() to module_param() and remove the mcq_mode_ops.
>

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
  2023-04-27  9:44 ` [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode Keoseong Park
  2023-05-01 17:29   ` Bart Van Assche
  2023-05-03  5:10   ` Stanley Chu
@ 2023-05-06 22:29   ` Martin K. Petersen
  2023-05-17  2:12   ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2023-05-06 22:29 UTC (permalink / raw)
  To: Keoseong Park
  Cc: ALIM AKHTAR, avri.altman, bvanassche, jejb, martin.petersen,
	stanley.chu, mani, quic_asutoshd, beanhuo, linux-scsi,
	linux-kernel


Keoseong,

> mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
> module_param_cb() to module_param() and remove the mcq_mode_ops.

Applied to 6.5/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
  2023-04-27  9:44 ` [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode Keoseong Park
                     ` (2 preceding siblings ...)
  2023-05-06 22:29   ` Martin K. Petersen
@ 2023-05-17  2:12   ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2023-05-17  2:12 UTC (permalink / raw)
  To: ALIM AKHTAR, avri.altman, bvanassche, jejb, stanley.chu, mani,
	quic_asutoshd, beanhuo, linux-scsi, linux-kernel, Keoseong Park
  Cc: Martin K . Petersen

On Thu, 27 Apr 2023 18:44:20 +0900, Keoseong Park wrote:

> mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
> module_param_cb() to module_param() and remove the mcq_mode_ops.
> 
> 

Applied to 6.5/scsi-queue, thanks!

[1/1] scsi: ufs: core: Change the module parameter macro of use_mcq_mode
      https://git.kernel.org/mkp/scsi/c/9a4327fd8864

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-17  2:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20230427094420epcms2p1043333a3e0c0cf58e66164e0b83b3b02@epcms2p1>
2023-04-27  9:44 ` [PATCH] scsi: ufs: core: Change the module parameter macro of use_mcq_mode Keoseong Park
2023-05-01 17:29   ` Bart Van Assche
2023-05-03  5:10   ` Stanley Chu
2023-05-06 22:29   ` Martin K. Petersen
2023-05-17  2:12   ` Martin K. Petersen

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®