Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: myrb: Simplify an alloc_ordered_workqueue() invocation

Let alloc_ordered_workqueue() format the workqueue name instead of calling
snprintf() explicitly.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240822195944.654691-11-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
c57a617f b3b359ac

+2 -5
+2 -4
drivers/scsi/myrb.c
··· 112 112 return false; 113 113 } 114 114 115 - snprintf(cb->work_q_name, sizeof(cb->work_q_name), 116 - "myrb_wq_%d", cb->host->host_no); 117 - cb->work_q = 118 - alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cb->work_q_name); 115 + cb->work_q = alloc_ordered_workqueue("myrb_wq_%d", WQ_MEM_RECLAIM, 116 + cb->host->host_no); 119 117 if (!cb->work_q) { 120 118 dma_pool_destroy(cb->dcdb_pool); 121 119 cb->dcdb_pool = NULL;
-1
drivers/scsi/myrb.h
··· 712 712 struct Scsi_Host *host; 713 713 714 714 struct workqueue_struct *work_q; 715 - char work_q_name[20]; 716 715 struct delayed_work monitor_work; 717 716 unsigned long primary_monitor_time; 718 717 unsigned long secondary_monitor_time;