Skip to content

Change the return type of the .queuecommand() callback

Bart Van Assche linux-scsi 2 versions – Applied

Status from this message: Applied to 6.20/scsi-queue, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 9 repliesApplied
  2. v11 patch 3 repliesSuperseded

Changes in v2 from the cover letter

* Included conversions for the SCSI drivers that use the DEF_SCSI_QCMD() macro.
* enum scsi_qc_status is now used in the DEF_SCSI_QCMD() implementation.
* Declarations have been ordered from longest to shortest if a declaration is modified.
* The whitespace in front of "(* queuecommand)(struct Scsi_Host *," has been removed.
* The patch description of patch 4/4 has been improved by mentioning that (at the time of this writing) only clang supports -Wimplicit-enum-enum-cast.
* Patches have been included that convert the aha152x, megaraid and megaraid_sas drivers.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5scsi: aha152x: Return SCSI_MLQUEUE_HOST_BUSY instead of 0x2003drivers/scsi/aha152x.c+2 -21 reply
2/5scsi: megaraid: Return SCSI_MLQUEUE_HOST_BUSY instead of 1drivers/scsi/megaraid.c+5 -53 replies
3/5scsi: megaraid_sas: Return SCSI_MLQUEUE_HOST_BUSY instead of 1drivers/scsi/megaraid/megaraid_mbox.c+5 -50 replies
4/5qla2xxx: Declare qla2xxx_mqueuecommand() staticdrivers/scsi/qla2xxx/qla_os.c+2 -21 reply
5/5scsi: Change the return type of the .queuecommand() callbackDocumentation/scsi/scsi_mid_low_api.rst drivers/ata/libata-scsi.c drivers/ata/libata.h +101 more+255 -1950 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchJohn Garry
1/5R-b
2/5
3/5
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] Change the return type of the .queuecommand() callback

Hi Martin,

Most but not all .queuecommand() implementations return a SCSI_MLQUEUE_* constant. This affects code readability: in order to understand what happens if a .queuecommand() function returns a value that is not a SCSI_MLQUEUE_* constant, one has to read the scsi_dispatch_cmd() implementation and check how other values are handled. Hence this patch series that changes the return type of the .queuecommand() callback and also of the implementations of this callback.

Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v1:
* Included conversions for the SCSI drivers that use the DEF_SCSI_QCMD() macro.
* enum scsi_qc_status is now used in the DEF_SCSI_QCMD() implementation.
* Declarations have been ordered from longest to shortest if a declaration is modified.
* The whitespace in front of "(* queuecommand)(struct Scsi_Host *," has been removed.
* The patch description of patch 4/4 has been improved by mentioning that (at the time of this writing) only clang supports -Wimplicit-enum-enum-cast.
* Patches have been included that convert the aha152x, megaraid and megaraid_sas drivers.

Bart Van Assche (5):
scsi: aha152x: Return SCSI_MLQUEUE_HOST_BUSY instead of 0x2003
scsi: megaraid: Return SCSI_MLQUEUE_HOST_BUSY instead of 1
scsi: megaraid_sas: Return SCSI_MLQUEUE_HOST_BUSY instead of 1
qla2xxx: Declare qla2xxx_mqueuecommand() static
scsi: Change the return type of the .queuecommand() callback

 Documentation/scsi/scsi_mid_low_api.rst   |  3 ++-
 drivers/ata/libata-scsi.c                 |  8 +++++---
 drivers/ata/libata.h                      |  3 ++-
 drivers/firewire/sbp2.c                   |  7 ++++---
 drivers/infiniband/ulp/srp/ib_srp.c       |  3 ++-
 drivers/message/fusion/mptfc.c            |  7 ++++---
 drivers/message/fusion/mptsas.c           |  4 ++--
 drivers/message/fusion/mptscsih.c         |  3 +--
 drivers/message/fusion/mptscsih.h         |  2 +-
 drivers/message/fusion/mptspi.c           |  4 ++--
 drivers/s390/scsi/zfcp_scsi.c             |  4 ++--
 drivers/scsi/3w-9xxx.c                    |  2 +-
 drivers/scsi/3w-sas.c                     |  8 +++++---
 drivers/scsi/3w-xxxx.c                    |  2 +-
 drivers/scsi/53c700.c                     |  6 +++---
 drivers/scsi/BusLogic.c                   |  2 +-
 drivers/scsi/BusLogic.h                   |  2 +-
 drivers/scsi/NCR5380.c                    |  4 ++--
 drivers/scsi/a100u2w.c                    |  2 +-
 drivers/scsi/aacraid/linit.c              |  4 ++--
 drivers/scsi/advansys.c                   |  5 +++--
 drivers/scsi/aha152x.c                    |  8 ++++----
 drivers/scsi/aha1542.c                    |  3 ++-
 drivers/scsi/aha1740.c                    |  2 +-
 drivers/scsi/aic7xxx/aic79xx_osm.c        | 12 ++++++------
 drivers/scsi/aic7xxx/aic7xxx_osm.c        |  4 ++--
 drivers/scsi/arcmsr/arcmsr_hba.c          |  5 +++--
 drivers/scsi/arm/acornscsi.c              |  2 +-
 drivers/scsi/arm/fas216.c                 |  8 ++++----
 drivers/scsi/arm/fas216.h                 | 11 +++++++----
 drivers/scsi/atp870u.c                    |  2 +-
 drivers/scsi/bfa/bfad_im.c                |  5 +++--
 drivers/scsi/bnx2fc/bnx2fc.h              |  3 ++-
 drivers/scsi/bnx2fc/bnx2fc_io.c           |  4 ++--
 drivers/scsi/csiostor/csio_scsi.c         |  4 ++--
 drivers/scsi/dc395x.c                     |  2 +-
 drivers/scsi/esas2r/esas2r.h              |  3 ++-
 drivers/scsi/esas2r/esas2r_main.c         |  3 ++-
 drivers/scsi/esp_scsi.c                   |  2 +-
 drivers/scsi/fdomain.c                    |  3 ++-
 drivers/scsi/fnic/fnic.h                  |  3 ++-
 drivers/scsi/fnic/fnic_scsi.c             |  3 ++-
 drivers/scsi/hpsa.c                       |  6 ++++--
 drivers/scsi/hptiop.c                     |  2 +-
 drivers/scsi/ibmvscsi/ibmvfc.c            |  3 ++-
 drivers/scsi/ibmvscsi/ibmvscsi.c          |  9 +++++----
 drivers/scsi/imm.c                        |  2 +-
 drivers/scsi/initio.c                     |  2 +-
 drivers/scsi/ipr.c                        |  4 ++--
 drivers/scsi/ips.c                        |  4 ++--
 drivers/scsi/libfc/fc_fcp.c               |  3 ++-
 drivers/scsi/libiscsi.c                   |  3 ++-
 drivers/scsi/libsas/sas_scsi_host.c       |  3 ++-
 drivers/scsi/lpfc/lpfc_scsi.c             |  8 ++++----
 drivers/scsi/mac53c94.c                   |  2 +-
 drivers/scsi/megaraid.c                   | 17 +++++++++--------
 drivers/scsi/megaraid.h                   |  6 ++++--
 drivers/scsi/megaraid/megaraid_mbox.c     | 22 ++++++++++++----------
 drivers/scsi/megaraid/megaraid_sas_base.c |  4 ++--
 drivers/scsi/mesh.c                       |  2 +-
 drivers/scsi/mpi3mr/mpi3mr_os.c           |  4 ++--
 drivers/scsi/mpt3sas/mpt3sas_scsih.c      |  4 ++--
 drivers/scsi/mvumi.c                      |  4 ++--
 drivers/scsi/myrb.c                       | 12 ++++++------
 drivers/scsi/myrs.c                       |  4 ++--
 drivers/scsi/ncr53c8xx.c                  |  2 +-
 drivers/scsi/nsp32.c                      |  5 +++--
 drivers/scsi/pcmcia/nsp_cs.c              |  2 +-
 drivers/scsi/pcmcia/nsp_cs.h              |  3 ++-
 drivers/scsi/pcmcia/sym53c500_cs.c        |  2 +-
 drivers/scsi/pmcraid.c                    |  4 ++--
 drivers/scsi/ppa.c                        |  2 +-
 drivers/scsi/ps3rom.c                     |  2 +-
 drivers/scsi/qedf/qedf.h                  |  4 ++--
 drivers/scsi/qedf/qedf_io.c               |  4 ++--
 drivers/scsi/qla1280.c                    | 16 ++++++++--------
 drivers/scsi/qla2xxx/qla_os.c             | 13 +++++++------
 drivers/scsi/qla4xxx/ql4_os.c             |  6 ++++--
 drivers/scsi/qlogicfas408.c               |  2 +-
 drivers/scsi/qlogicfas408.h               |  3 ++-
 drivers/scsi/qlogicpti.c                  |  2 +-
 drivers/scsi/scsi_debug.c                 |  9 +++++----
 drivers/scsi/smartpqi/smartpqi_init.c     |  3 ++-
 drivers/scsi/snic/snic.h                  |  3 ++-
 drivers/scsi/snic/snic_scsi.c             |  4 ++--
 drivers/scsi/stex.c                       |  2 +-
 drivers/scsi/storvsc_drv.c                |  3 ++-
 drivers/scsi/sym53c8xx_2/sym_glue.c       |  2 +-
 drivers/scsi/virtio_scsi.c                |  4 ++--
 drivers/scsi/vmw_pvscsi.c                 |  2 +-
 drivers/scsi/wd33c93.c                    |  2 +-
 drivers/scsi/wd33c93.h                    |  3 ++-
 drivers/scsi/wd719x.c                     |  3 ++-
 drivers/scsi/xen-scsifront.c              |  4 ++--
 drivers/target/loopback/tcm_loop.c        |  3 ++-
 drivers/ufs/core/ufshcd.c                 |  7 ++++---
 drivers/usb/image/microtek.c              |  6 +++---
 drivers/usb/storage/scsiglue.c            |  2 +-
 drivers/usb/storage/uas.c                 |  2 +-
 include/linux/libata.h                    |  3 ++-
 include/scsi/libfc.h                      |  3 ++-
 include/scsi/libiscsi.h                   |  3 ++-
 include/scsi/libsas.h                     |  3 ++-
 include/scsi/scsi_host.h                  | 12 ++++++++----
 104 files changed, 261 insertions(+), 206 deletions(-)