scsi: mpi3mr: Simplify the workqueue allocation code
Subsystems (2)
PATCH 1/1 scsi: mpi3mr: Simplify the workqueue allocation code
Let alloc_ordered_workqueue() format the workqueue name instead of calling scnprintf() explicitly. Compile-tested only.
Cc Chandrakanth Patil <[email protected]>
Signed-off-by Bart Van Assche <[email protected]>
--- drivers/scsi/mpi3mr/mpi3mr.h | 2 -- drivers/scsi/mpi3mr/mpi3mr_fw.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/scsi/mpi3mr/mpi3mr.h +0 -2
@@ -1076,7 +1076,6 @@ struct scmd_priv {* @fwevt_worker_thread: Firmware event worker thread * @fwevt_lock: Firmware event lock * @fwevt_list: Firmware event list -* @watchdog_work_q_name: Fault watchdog worker thread name * @watchdog_work_q: Fault watchdog worker thread * @watchdog_work: Fault watchdog work * @watchdog_lock: Fault watchdog lock
@@ -1265,7 +1264,6 @@ struct mpi3mr_ioc {spinlock_t fwevt_lock;struct list_head fwevt_list; -char watchdog_work_q_name[50 ];struct workqueue_struct *watchdog_work_q;struct delayed_work watchdog_work;spinlock_t watchdog_lock;
drivers/scsi/mpi3mr/mpi3mr_fw.c +1 -4
@@ -2878,11 +2878,8 @@ void mpi3mr_start_watchdog(struct mpi3mr_ioc *mrioc)return ;INIT_DELAYED_WORK (&mrioc->watchdog_work, mpi3mr_watchdog_work); -snprintf (mrioc->watchdog_work_q_name, -sizeof (mrioc->watchdog_work_q_name),"watchdog_%s%d" , mrioc->name, - mrioc->id); mrioc->watchdog_work_q =alloc_ordered_workqueue ( -"%s" ,WQ_MEM_RECLAIM , mrioc->watchdog_work_q_name); +"watchdog_%s%d" ,WQ_MEM_RECLAIM , mrioc->name, mrioc->id);if (!mrioc->watchdog_work_q) {ioc_err (mrioc,"%s: failed (line=%d)\n" , __func__, __LINE__);return ;
Martin K. Petersen
AppliedBart,
Quoted 2 lines
Let
alloc_ordered_workqueue()format the workqueue name instead of callingscnprintf()explicitly. Compile-tested only.
Applied to 6.20/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 4 lines · Bart Van Assche
Let
alloc_ordered_workqueue()format the workqueue name instead of callingscnprintf()explicitly. Compile-tested only.
Applied to 6.20/scsi-queue, thanks!
[1/1] scsi: mpi3mr: Simplify the workqueue allocation code
https://git.kernel.org/mkp/scsi/c/8d0aecdebc0f
Signature · 1 line
Martin K. Petersen