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 <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240822195944.654691-9-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
5615cfb3cb
commit
1bd289620e
@ -1059,7 +1059,6 @@ struct scmd_priv {
|
||||
* @sbq_lock: Sense buffer queue lock
|
||||
* @sbq_host_index: Sense buffer queuehost index
|
||||
* @event_masks: Event mask bitmap
|
||||
* @fwevt_worker_name: Firmware event worker thread name
|
||||
* @fwevt_worker_thread: Firmware event worker thread
|
||||
* @fwevt_lock: Firmware event lock
|
||||
* @fwevt_list: Firmware event list
|
||||
@ -1240,7 +1239,6 @@ struct mpi3mr_ioc {
|
||||
u32 sbq_host_index;
|
||||
u32 event_masks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS];
|
||||
|
||||
char fwevt_worker_name[MPI3MR_NAME_LENGTH];
|
||||
struct workqueue_struct *fwevt_worker_thread;
|
||||
spinlock_t fwevt_lock;
|
||||
struct list_head fwevt_list;
|
||||
|
@ -5305,10 +5305,8 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
else
|
||||
scsi_host_set_guard(shost, SHOST_DIX_GUARD_CRC);
|
||||
|
||||
snprintf(mrioc->fwevt_worker_name, sizeof(mrioc->fwevt_worker_name),
|
||||
"%s%d_fwevt_wrkr", mrioc->driver_name, mrioc->id);
|
||||
mrioc->fwevt_worker_thread = alloc_ordered_workqueue(
|
||||
mrioc->fwevt_worker_name, 0);
|
||||
"%s%d_fwevt_wrkr", 0, mrioc->driver_name, mrioc->id);
|
||||
if (!mrioc->fwevt_worker_thread) {
|
||||
ioc_err(mrioc, "failure at %s:%d/%s()!\n",
|
||||
__FILE__, __LINE__, __func__);
|
||||
|
Loading…
Reference in New Issue
Block a user