Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code
@ 2026-01-06 18:56 Bart Van Assche
  2026-01-12  3:03 ` Martin K. Petersen
  2026-01-17  4:36 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2026-01-06 18:56 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, Bart Van Assche, Ranjan Kumar, Sathya Prakash,
	Sreekanth Reddy, Suganath Prabu Subramani, James E.J. Bottomley

Let alloc_ordered_workqueue() format the workqueue name instead of
calling scnprintf() explicitly. Compile-tested only.

Cc: Ranjan Kumar <ranjan.kumar@broadcom.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 5 +----
 drivers/scsi/mpt3sas/mpt3sas_base.h | 6 ++----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index e4e22cb0e277..2f2183f405c9 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -843,11 +843,8 @@ mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc)
 	/* initialize fault polling */
 
 	INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work);
-	scnprintf(ioc->fault_reset_work_q_name,
-	    sizeof(ioc->fault_reset_work_q_name), "poll_%s%d_status",
-	    ioc->driver_name, ioc->id);
 	ioc->fault_reset_work_q = alloc_ordered_workqueue(
-		"%s", WQ_MEM_RECLAIM, ioc->fault_reset_work_q_name);
+		"poll_%s%d_status", WQ_MEM_RECLAIM, ioc->driver_name, ioc->id);
 	if (!ioc->fault_reset_work_q) {
 		ioc_err(ioc, "%s: failed (line=%d)\n", __func__, __LINE__);
 		return;
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index de37fa5ac073..d4597d058705 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -1163,9 +1163,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
  * @mask_interrupts: ignore interrupt
  * @pci_access_mutex: Mutex to synchronize ioctl, sysfs show path and
  *			pci resource handling
- * @fault_reset_work_q_name: fw fault work queue
- * @fault_reset_work_q: ""
- * @fault_reset_work: ""
+ * @fault_reset_work_q: fw fault workqueue
+ * @fault_reset_work: fw fault work
  * @firmware_event_thread: fw event work queue
  * @fw_event_lock:
  * @fw_event_list: list of fw events
@@ -1349,7 +1348,6 @@ struct MPT3SAS_ADAPTER {
 	u8		mask_interrupts;
 
 	/* fw fault handler */
-	char		fault_reset_work_q_name[20];
 	struct workqueue_struct *fault_reset_work_q;
 	struct delayed_work fault_reset_work;
 

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

* Re: [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code
  2026-01-06 18:56 [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code Bart Van Assche
@ 2026-01-12  3:03 ` Martin K. Petersen
  2026-01-17  4:36 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2026-01-12  3:03 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, Ranjan Kumar, Sathya Prakash,
	Sreekanth Reddy, Suganath Prabu Subramani, James E.J. Bottomley


Bart,

> Let alloc_ordered_workqueue() format the workqueue name instead of
> calling scnprintf() explicitly. Compile-tested only.

Applied to 6.20/scsi-staging, thanks!

-- 
Martin K. Petersen

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

* Re: [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code
  2026-01-06 18:56 [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code Bart Van Assche
  2026-01-12  3:03 ` Martin K. Petersen
@ 2026-01-17  4:36 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2026-01-17  4:36 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, linux-scsi, Ranjan Kumar, Sathya Prakash,
	Sreekanth Reddy, Suganath Prabu Subramani, James E.J. Bottomley

On Tue, 06 Jan 2026 11:56:54 -0700, Bart Van Assche wrote:

> Let alloc_ordered_workqueue() format the workqueue name instead of
> calling scnprintf() explicitly. Compile-tested only.
> 
> 

Applied to 6.20/scsi-queue, thanks!

[1/1] scsi: mpt3sas: Simplify the workqueue allocation code
      https://git.kernel.org/mkp/scsi/c/bf286f5558bf

-- 
Martin K. Petersen

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

end of thread, other threads:[~2026-01-17  4:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 18:56 [PATCH] scsi: mpt3sas: Simplify the workqueue allocation code Bart Van Assche
2026-01-12  3:03 ` Martin K. Petersen
2026-01-17  4:36 ` 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