linux/drivers/scsi/qla4xxx
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
..
Kconfig
Makefile
ql4_83xx.c scsi: qla4xxx: Simplify conditional 2021-05-10 13:25:12 -04:00
ql4_83xx.h
ql4_attr.c scsi: qla4xxx: Switch to attribute groups 2021-10-16 21:45:59 -04:00
ql4_bsg.c
ql4_bsg.h
ql4_dbg.c
ql4_dbg.h
ql4_def.h scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting() 2023-03-09 22:00:39 -05:00
ql4_fw.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
ql4_glbl.h scsi: qla4xxx: Switch to attribute groups 2021-10-16 21:45:59 -04:00
ql4_init.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_inline.h
ql4_iocb.c scsi: qla4xxx: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:41 -04:00
ql4_isr.c scsi: qla4xxx: Remove unused 'count' variable 2023-04-02 21:48:46 -04:00
ql4_mbx.c scsi: qla4xxx: Replace deprecated strncpy() with strscpy() 2024-03-10 18:37:43 -04:00
ql4_nvram.c
ql4_nvram.h
ql4_nx.c scsi: qla4xxx: Convert uses of __constant_cpu_to_<foo> to cpu_to_<foo> 2021-08-01 13:39:17 -04:00
ql4_nx.h
ql4_os.c scsi: Expand all create*_workqueue() invocations 2024-08-22 21:28:55 -04:00
ql4_version.h