mbox series

[v3,00/18] Simplify multiple create*_workqueue() invocations

Message ID 20240822195944.654691-1-bvanassche@acm.org
Headers show
Series Simplify multiple create*_workqueue() invocations | expand

Message

Bart Van Assche Aug. 22, 2024, 7:59 p.m. UTC
Hi Martin,

Multiple SCSI drivers use snprintf() to format a workqueue name before
invoking one of the create*_workqueue() macros. This patch series
simplifies such code by passing the format string and arguments to
alloc_workqueue(). Additionally, the structure members that are only used
as a temporary buffer for formatting workqueue names are removed. Please
consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v2:
 - Added more Reviewed-by tags.

Changes compared to v1:
 - Added several Reviewed-by tags.

Bart Van Assche (18):
  scsi: Expand all create*_workqueue() invocations
  scsi: mptfusion: Simplify the alloc*_workqueue() invocations
  scsi: be2iscsi: Simplify an alloc_workqueue() invocation
  scsi: bfa: Simplify an alloc_ordered_workqueue() invocation
  scsi: esas2r: Simplify an alloc_ordered_workqueue() invocation
  scsi: fcoe: Simplify alloc_ordered_workqueue() invocations
  scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation
  scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation
  scsi: mpt3sas: Simplify an alloc_ordered_workqueue() invocation
  scsi: myrb: Simplify an alloc_ordered_workqueue() invocation
  scsi: myrs: Simplify an alloc_ordered_workqueue() invocation
  scsi: qedf: Simplify alloc_workqueue() invocations
  scsi: qedi: Simplify an alloc_workqueue() invocation
  scsi: snic: Simplify alloc_workqueue() invocations
  scsi: scsi_transport_fc: Simplify alloc_workqueue() invocations
  scsi: stex: Simplify an alloc_ordered_workqueue() invocation
  scsi: ufs: Simplify alloc*_workqueue() invocation
  scsi: core: Simplify an alloc_workqueue() invocation

 drivers/message/fusion/mptbase.c            | 10 +++-------
 drivers/message/fusion/mptbase.h            |  3 ---
 drivers/message/fusion/mptfc.c              |  7 ++-----
 drivers/scsi/be2iscsi/be_main.c             |  6 ++----
 drivers/scsi/bfa/bfad_im.c                  |  5 ++---
 drivers/scsi/bfa/bfad_im.h                  |  1 -
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c           |  4 ++--
 drivers/scsi/device_handler/scsi_dh_rdac.c  |  3 ++-
 drivers/scsi/elx/efct/efct_lio.c            |  3 ++-
 drivers/scsi/esas2r/esas2r.h                |  1 -
 drivers/scsi/esas2r/esas2r_init.c           |  5 ++---
 drivers/scsi/fcoe/fcoe_sysfs.c              | 18 +++++------------
 drivers/scsi/fnic/fnic_main.c               |  6 ++++--
 drivers/scsi/hisi_sas/hisi_sas_main.c       |  3 ++-
 drivers/scsi/hosts.c                        |  9 ++++-----
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c    |  5 ++---
 drivers/scsi/libfc/fc_exch.c                |  3 ++-
 drivers/scsi/libfc/fc_rport.c               |  3 ++-
 drivers/scsi/libsas/sas_init.c              |  4 ++--
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  4 ++--
 drivers/scsi/mpi3mr/mpi3mr.h                |  2 --
 drivers/scsi/mpi3mr/mpi3mr_fw.c             |  4 ++--
 drivers/scsi/mpi3mr/mpi3mr_os.c             |  4 +---
 drivers/scsi/mpt3sas/mpt3sas_base.c         |  4 ++--
 drivers/scsi/mpt3sas/mpt3sas_base.h         |  4 +---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c        |  4 +---
 drivers/scsi/myrb.c                         |  5 ++---
 drivers/scsi/myrb.h                         |  1 -
 drivers/scsi/myrs.c                         |  5 ++---
 drivers/scsi/myrs.h                         |  1 -
 drivers/scsi/qedf/qedf_main.c               | 20 +++++++++----------
 drivers/scsi/qedi/qedi_main.c               |  8 +++++---
 drivers/scsi/qla2xxx/qla_os.c               |  6 ++++--
 drivers/scsi/qla4xxx/ql4_os.c               |  2 +-
 drivers/scsi/scsi_transport_fc.c            | 11 +++--------
 drivers/scsi/snic/snic_main.c               |  8 ++++----
 drivers/scsi/stex.c                         |  6 ++----
 drivers/scsi/vmw_pvscsi.c                   |  3 ++-
 drivers/ufs/core/ufshcd.c                   | 22 +++++++--------------
 include/scsi/fcoe_sysfs.h                   |  2 --
 include/scsi/scsi_host.h                    |  1 -
 include/scsi/scsi_transport_fc.h            |  6 ------
 42 files changed, 90 insertions(+), 142 deletions(-)

Comments

Martin K. Petersen Aug. 23, 2024, 1:32 a.m. UTC | #1
Bart,

> Multiple SCSI drivers use snprintf() to format a workqueue name before
> invoking one of the create*_workqueue() macros. This patch series
> simplifies such code by passing the format string and arguments to
> alloc_workqueue(). Additionally, the structure members that are only
> used as a temporary buffer for formatting workqueue names are removed.
> Please consider this patch series for the next merge window.

Applied to 6.12/scsi-staging, thanks!
Martin K. Petersen Aug. 29, 2024, 2:50 a.m. UTC | #2
On Thu, 22 Aug 2024 12:59:04 -0700, Bart Van Assche wrote:

> Multiple SCSI drivers use snprintf() to format a workqueue name before
> invoking one of the create*_workqueue() macros. This patch series
> simplifies such code by passing the format string and arguments to
> alloc_workqueue(). Additionally, the structure members that are only used
> as a temporary buffer for formatting workqueue names are removed. Please
> consider this patch series for the next merge window.
> 
> [...]

Applied to 6.12/scsi-queue, thanks!

[01/18] scsi: Expand all create*_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/b97c0741c7dc
[02/18] scsi: mptfusion: Simplify the alloc*_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/dec523975b85
[03/18] scsi: be2iscsi: Simplify an alloc_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/66088e7b9182
[04/18] scsi: bfa: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/70fbb7c11507
[05/18] scsi: esas2r: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/4cb1b41a5ee4
[06/18] scsi: fcoe: Simplify alloc_ordered_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/d77381c2f62a
[07/18] scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/5615cfb3cbad
[08/18] scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/1bd289620e42
[09/18] scsi: mpt3sas: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/b3b359ac7267
[10/18] scsi: myrb: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/c57a617fd53f
[11/18] scsi: myrs: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/f30679166255
[12/18] scsi: qedf: Simplify alloc_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/8bbe60bbd43d
[13/18] scsi: qedi: Simplify an alloc_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/19d7cda1c630
[14/18] scsi: snic: Simplify alloc_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/6411307b6328
[15/18] scsi: scsi_transport_fc: Simplify alloc_workqueue() invocations
        https://git.kernel.org/mkp/scsi/c/06d53789761c
[16/18] scsi: stex: Simplify an alloc_ordered_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/0ef9b0186dae
[17/18] scsi: ufs: Simplify alloc*_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/1aa992cbc272
[18/18] scsi: core: Simplify an alloc_workqueue() invocation
        https://git.kernel.org/mkp/scsi/c/ba52850cb6b4