1
linux/drivers/scsi/fnic
Bart Van Assche b97c0741c7 scsi: Expand all create*_workqueue() invocations
The workqueue maintainer wants to remove the create*_workqueue() macros
because these macros always set the WQ_MEM_RECLAIM flag and because these
only support literal workqueue names. Hence this patch that replaces the
create*_workqueue() invocations with the definition of this macro. The
WQ_MEM_RECLAIM flag has been retained because I think that flag is necessary
for workqueues created by storage drivers. This patch has been generated by
running spatch and git clang-format. spatch has been invoked as follows:

spatch --in-place --sp-file expand-create-workqueue.spatch $(git grep -lEw 'create_(freezable_|singlethread_|)workqueue' */scsi */ufs)

The contents of the expand-create-workqueue.spatch file is as follows:

@@
expression name;
@@
-create_workqueue(name)
+alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, name)
@@
expression name;
@@
-create_freezable_workqueue(name)
+alloc_workqueue("%s", WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1, name)
@@
expression name;
@@
-create_singlethread_workqueue(name)
+alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, name)

Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240822195944.654691-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-08-22 21:28:55 -04:00
..
cq_desc.h
cq_enet_desc.h
cq_exch_desc.h
fcpio.h
fnic_attrs.c scsi: fnic: Convert snprintf() to sysfs_emit() 2024-01-29 20:40:48 -05:00
fnic_debugfs.c scsi: fnic: Return error if vmalloc() failed 2023-12-05 21:01:52 -05:00
fnic_fcs.c scsi: fnic: Move fnic_fnic_flush_tx() to a work queue 2024-02-12 20:50:07 -05:00
fnic_fip.h
fnic_io.h
fnic_isr.c scsi: fnic: Modify ISRs to support multiqueue (MQ) 2023-12-13 22:11:33 -05:00
fnic_main.c scsi: Expand all create*_workqueue() invocations 2024-08-22 21:28:55 -04:00
fnic_res.c scsi: fnic: Get copy workqueue count and interrupt mode from config 2023-12-13 22:11:33 -05:00
fnic_res.h
fnic_scsi.c SCSI misc on 20240316 2024-03-16 16:31:12 -07:00
fnic_stats.h scsi: fnic: Define stats to track multiqueue (MQ) IOs 2023-12-13 22:11:33 -05:00
fnic_trace.c scsi: fnic: Define stats to track multiqueue (MQ) IOs 2023-12-13 22:11:33 -05:00
fnic_trace.h
fnic.h scsi: fnic: Move fnic_fnic_flush_tx() to a work queue 2024-02-12 20:50:07 -05:00
Makefile
rq_enet_desc.h
vnic_cq_copy.h
vnic_cq.c
vnic_cq.h
vnic_dev.c scsi: fnic: Add and improve log messages 2023-12-13 22:11:33 -05:00
vnic_dev.h
vnic_devcmd.h
vnic_intr.c
vnic_intr.h
vnic_nic.h
vnic_resource.h
vnic_rq.c
vnic_rq.h
vnic_scsi.h scsi: fnic: Modify definitions to sync with VIC firmware 2023-12-13 22:11:33 -05:00
vnic_stats.h
vnic_wq_copy.c
vnic_wq_copy.h
vnic_wq.c
vnic_wq.h
wq_enet_desc.h