summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/snic
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2024-08-23 03:30:06 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2024-08-23 03:30:06 +0200
commit70302fc7adcd29c4c744489cd89e2d3ed08ecd8d (patch)
tree0837768fb2eccc4622f6da43407ee8487981c5aa /drivers/scsi/snic
parentscsi: target: Remove unused declarations (diff)
parentscsi: core: Simplify an alloc_workqueue() invocation (diff)
downloadlinux-70302fc7adcd29c4c744489cd89e2d3ed08ecd8d.tar.xz
linux-70302fc7adcd29c4c744489cd89e2d3ed08ecd8d.zip
Merge patch series "Simplify multiple create*_workqueue() invocations"
Bart Van Assche <bvanassche@acm.org> says: Hi Martin, Multiple SCSI drivers use snprintf() to format a workqueue name before invoking one of the create*_workqueue() macros. This patch series simplifies such code by passing the format string and arguments to alloc_workqueue(). Additionally, the structure members that are only used as a temporary buffer for formatting workqueue names are removed. Please consider this patch series for the next merge window. Thanks, Bart. Link: https://lore.kernel.org/r/20240822195944.654691-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/snic')
-rw-r--r--drivers/scsi/snic/snic_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c
index abc78320c66d..9be3f0193145 100644
--- a/drivers/scsi/snic/snic_main.c
+++ b/drivers/scsi/snic/snic_main.c
@@ -300,9 +300,8 @@ snic_add_host(struct Scsi_Host *shost, struct pci_dev *pdev)
}
SNIC_BUG_ON(shost->work_q != NULL);
- snprintf(shost->work_q_name, sizeof(shost->work_q_name), "scsi_wq_%d",
- shost->host_no);
- shost->work_q = create_singlethread_workqueue(shost->work_q_name);
+ shost->work_q = alloc_ordered_workqueue("scsi_wq_%d", WQ_MEM_RECLAIM,
+ shost->host_no);
if (!shost->work_q) {
SNIC_HOST_ERR(shost, "Failed to Create ScsiHost wq.\n");
@@ -884,7 +883,8 @@ snic_global_data_init(void)
snic_glob->req_cache[SNIC_REQ_TM_CACHE] = cachep;
/* snic_event queue */
- snic_glob->event_q = create_singlethread_workqueue("snic_event_wq");
+ snic_glob->event_q =
+ alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, "snic_event_wq");
if (!snic_glob->event_q) {
SNIC_ERR("snic event queue create failed\n");
ret = -ENOMEM;