Skip to content

Commit 4cb1b41

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: esas2r: 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 70fbb7c commit 4cb1b41

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/scsi/esas2r/esas2r.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ struct esas2r_adapter {
929929
struct list_head fw_event_list;
930930
spinlock_t fw_event_lock;
931931
u8 fw_events_off; /* if '1', then ignore events */
932-
char fw_event_q_name[ESAS2R_KOBJ_NAME_LEN];
933932
/*
934933
* intr_mode stores the interrupt mode currently being used by this
935934
* adapter. it is based on the interrupt_mode module parameter, but

drivers/scsi/esas2r/esas2r_init.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,8 @@ int esas2r_init_adapter(struct Scsi_Host *host, struct pci_dev *pcid,
311311
sema_init(&a->nvram_semaphore, 1);
312312

313313
esas2r_fw_event_off(a);
314-
snprintf(a->fw_event_q_name, ESAS2R_KOBJ_NAME_LEN, "esas2r/%d",
315-
a->index);
316-
a->fw_event_q = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
317-
a->fw_event_q_name);
314+
a->fw_event_q =
315+
alloc_ordered_workqueue("esas2r/%d", WQ_MEM_RECLAIM, a->index);
318316

319317
init_waitqueue_head(&a->buffered_ioctl_waiter);
320318
init_waitqueue_head(&a->nvram_waiter);

0 commit comments

Comments
 (0)