Skip to content

Commit 1bd2896

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation
Let alloc_ordered_workqueue() format the workqueue name instead of calling snprintf() explicitly. Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 5615cfb commit 1bd2896

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,6 @@ struct scmd_priv {
10591059
* @sbq_lock: Sense buffer queue lock
10601060
* @sbq_host_index: Sense buffer queuehost index
10611061
* @event_masks: Event mask bitmap
1062-
* @fwevt_worker_name: Firmware event worker thread name
10631062
* @fwevt_worker_thread: Firmware event worker thread
10641063
* @fwevt_lock: Firmware event lock
10651064
* @fwevt_list: Firmware event list
@@ -1240,7 +1239,6 @@ struct mpi3mr_ioc {
12401239
u32 sbq_host_index;
12411240
u32 event_masks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS];
12421241

1243-
char fwevt_worker_name[MPI3MR_NAME_LENGTH];
12441242
struct workqueue_struct *fwevt_worker_thread;
12451243
spinlock_t fwevt_lock;
12461244
struct list_head fwevt_list;

drivers/scsi/mpi3mr/mpi3mr_os.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5305,10 +5305,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
53055305
else
53065306
scsi_host_set_guard(shost, SHOST_DIX_GUARD_CRC);
53075307

5308-
snprintf(mrioc->fwevt_worker_name, sizeof(mrioc->fwevt_worker_name),
5309-
"%s%d_fwevt_wrkr", mrioc->driver_name, mrioc->id);
53105308
mrioc->fwevt_worker_thread = alloc_ordered_workqueue(
5311-
mrioc->fwevt_worker_name, 0);
5309+
"%s%d_fwevt_wrkr", 0, mrioc->driver_name, mrioc->id);
53125310
if (!mrioc->fwevt_worker_thread) {
53135311
ioc_err(mrioc, "failure at %s:%d/%s()!\n",
53145312
__FILE__, __LINE__, __func__);

0 commit comments

Comments
 (0)