Skip to content

nvme: dead code cleanups

Guixin Liu linux-nvme 2 versions – Applied

Status from this message: Thanks, applied to nvme-7.4.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 19 repliesApplied
  2. v19 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- fold the Documentation/ABI/stable/sysfs-nvme update into patch 5, whose show function no longer returns "off" (reported by Sashiko)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/9nvme-pci: remove write-only NVMEQ_DELETE_ERROR flagdrivers/nvme/host/pci.c+1 -192 replies
2/9nvme-fc: remove dead seqno field in nvme_fc_queuedrivers/nvme/host/fc.c+0 -12 replies
3/9nvme-auth: remove dead entry field in nvme_dhchap_queue_contextdrivers/nvme/host/auth.c+0 -12 replies
4/9nvme-fabrics: remove dead hostnqn already-assigned checkdrivers/nvme/host/fabrics.c+0 -62 replies
5/9nvme: drop unreachable "off" case in reconnect_delay_show()Documentation/ABI/stable/sysfs-nvme drivers/nvme/host/sysfs.c+1 -42 replies
6/9nvmet-fc: remove dead fields in nvmet_fc_ls_iod and nvmet_fc_tgt_queuedrivers/nvme/target/fc.c+0 -32 replies
7/9nvmet: remove unreachable "pcie" entry from the address family mapdrivers/nvme/target/configfs.c+2 -32 replies
8/9nvmet: passthru: remove unreachable break statementsdrivers/nvme/target/passthru.c+0 -22 replies
9/9nvmet-pci-epf: don't drain the never-populated SQ listdrivers/nvme/target/pci-epf.c+0 -22 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigNilay Shroff
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9R-b R-b
9/9R-b R-b

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/9] nvme: dead code cleanups

A round of dead code removals in the nvme host and target drivers, all found by code inspection. Every patch stands on its own and can be picked individually:

- the NVMEQ_DELETE_ERROR flag lost its only reader in 2020 and is now write-only; dropping it also removes the nvme_del_cq_end() wrapper, which degenerates to nvme_del_queue_end() without it
- struct fields never referenced since they were introduced:
nvme_fc_queue.seqno, nvme_dhchap_queue_context.entry, nvmet_fc_ls_iod.fcpreq and nvmet_fc_tgt_queue.ninetypercent
- a hostnqn already-assigned check that can never fire because opts->host is only set after the option parsing loop
- the reconnect_delay "off" case, copied from fast_io_fail_tmo but unreachable for an unsigned value the parser bounds to positive values, along with its sentence in the ABI documentation
- an address family map entry that both show and store skip, an unreachable break in the passthru feature handling, and a drain of an SQ list that is never populated

Compile tested only.

Changes since v1:

- fold the Documentation/ABI/stable/sysfs-nvme update into patch 5, whose show function no longer returns "off" (reported by Sashiko)

Guixin Liu (9):
nvme-pci: remove write-only NVMEQ_DELETE_ERROR flag
nvme-fc: remove dead seqno field in nvme_fc_queue
nvme-auth: remove dead entry field in nvme_dhchap_queue_context
nvme-fabrics: remove dead hostnqn already-assigned check
nvme: drop unreachable "off" case in reconnect_delay_show()
nvmet-fc: remove dead fields in nvmet_fc_ls_iod and nvmet_fc_tgt_queue
nvmet: remove unreachable "pcie" entry from the address family map
nvmet: passthru: remove unreachable break statements
nvmet-pci-epf: don't drain the never-populated SQ list

 Documentation/ABI/stable/sysfs-nvme |  3 +--
 drivers/nvme/host/auth.c            |  1 -
 drivers/nvme/host/fabrics.c         |  6 ------
 drivers/nvme/host/fc.c              |  1 -
 drivers/nvme/host/pci.c             | 20 +-------------------
 drivers/nvme/host/sysfs.c           |  2 --
 drivers/nvme/target/configfs.c      |  5 ++---
 drivers/nvme/target/fc.c            |  3 ---
 drivers/nvme/target/passthru.c      |  2 --
 drivers/nvme/target/pci-epf.c       |  2 --
 10 files changed, 4 insertions(+), 41 deletions(-)
Signature · 1 line
2.43.7