summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe_sysfs.c
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/fcoe/fcoe_sysfs.c
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/fcoe/fcoe_sysfs.c')
-rw-r--r--drivers/scsi/fcoe/fcoe_sysfs.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 7d3b904af9e8..0609ca6b9353 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -45,12 +45,8 @@ MODULE_PARM_DESC(fcf_dev_loss_tmo,
*/
#define fcoe_ctlr_id(x) \
((x)->id)
-#define fcoe_ctlr_work_q_name(x) \
- ((x)->work_q_name)
#define fcoe_ctlr_work_q(x) \
((x)->work_q)
-#define fcoe_ctlr_devloss_work_q_name(x) \
- ((x)->devloss_work_q_name)
#define fcoe_ctlr_devloss_work_q(x) \
((x)->devloss_work_q)
#define fcoe_ctlr_mode(x) \
@@ -797,18 +793,14 @@ struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent,
ctlr->fcf_dev_loss_tmo = fcoe_fcf_dev_loss_tmo;
- snprintf(ctlr->work_q_name, sizeof(ctlr->work_q_name),
- "ctlr_wq_%d", ctlr->id);
- ctlr->work_q = create_singlethread_workqueue(
- ctlr->work_q_name);
+ ctlr->work_q = alloc_ordered_workqueue("ctlr_wq_%d", WQ_MEM_RECLAIM,
+ ctlr->id);
if (!ctlr->work_q)
goto out_del;
- snprintf(ctlr->devloss_work_q_name,
- sizeof(ctlr->devloss_work_q_name),
- "ctlr_dl_wq_%d", ctlr->id);
- ctlr->devloss_work_q = create_singlethread_workqueue(
- ctlr->devloss_work_q_name);
+ ctlr->devloss_work_q = alloc_ordered_workqueue("ctlr_dl_wq_%d",
+ WQ_MEM_RECLAIM,
+ ctlr->id);
if (!ctlr->devloss_work_q)
goto out_del_q;