1

scsi: core: Simplify an alloc_workqueue() invocation

Let alloc_workqueue() format the workqueue name. Remove the
work_q_name[] member from struct Scsi_Host because it is no longer
used by any SCSI driver nor by the SCSI core.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240822195944.654691-19-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche 2024-08-22 12:59:22 -07:00 committed by Martin K. Petersen
parent 1aa992cbc2
commit ba52850cb6
2 changed files with 4 additions and 6 deletions
drivers/scsi
include/scsi

View File

@ -292,11 +292,10 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
} }
if (shost->transportt->create_work_queue) { if (shost->transportt->create_work_queue) {
snprintf(shost->work_q_name, sizeof(shost->work_q_name), shost->work_q = alloc_workqueue(
"scsi_wq_%d", shost->host_no); "scsi_wq_%d",
shost->work_q = alloc_workqueue("%s", WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, 1,
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, shost->host_no);
1, shost->work_q_name);
if (!shost->work_q) { if (!shost->work_q) {
error = -EINVAL; error = -EINVAL;

View File

@ -677,7 +677,6 @@ struct Scsi_Host {
/* /*
* Optional work queue to be utilized by the transport * Optional work queue to be utilized by the transport
*/ */
char work_q_name[20];
struct workqueue_struct *work_q; struct workqueue_struct *work_q;
/* /*