[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240630222904.627462-44-bvanassche@acm.org>
Date: Sun, 30 Jun 2024 15:27:01 -0700
From: Bart Van Assche <bvanassche@....org>
To: Tejun Heo <tj@...nel.org>
Cc: Lai Jiangshan <jiangshanlai@...il.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Hannes Reinecke <hare@...e.de>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
Subject: [PATCH 43/53] scsi: fcoe: Simplify the create*_workqueue() calls
Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.
Cc: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
drivers/scsi/fcoe/fcoe_sysfs.c | 7 +------
include/scsi/fcoe_sysfs.h | 1 -
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c
index 453665ac6020..d534f4007399 100644
--- a/drivers/scsi/fcoe/fcoe_sysfs.c
+++ b/drivers/scsi/fcoe/fcoe_sysfs.c
@@ -45,8 +45,6 @@ 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) \
@@ -797,10 +795,7 @@ 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 = create_singlethread_workqueue2("ctlr_wq_%d", ctlr->id);
if (!ctlr->work_q)
goto out_del;
diff --git a/include/scsi/fcoe_sysfs.h b/include/scsi/fcoe_sysfs.h
index 4b1216de3f22..45b1e9ca92e9 100644
--- a/include/scsi/fcoe_sysfs.h
+++ b/include/scsi/fcoe_sysfs.h
@@ -50,7 +50,6 @@ struct fcoe_ctlr_device {
struct fcoe_sysfs_function_template *f;
struct list_head fcfs;
- char work_q_name[20];
struct workqueue_struct *work_q;
char devloss_work_q_name[20];
struct workqueue_struct *devloss_work_q;
Powered by blists - more mailing lists