Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] nvme: dead code cleanups
@ 2026-11-06  2:27 Guixin Liu
  2026-11-06  2:27 ` [PATCH v2 1/9] nvme-pci: remove write-only NVMEQ_DELETE_ERROR flag Guixin Liu
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Guixin Liu @ 2026-11-06  2:27 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Nilay Shroff, Daniel Wagner, Hannes Reinecke
  Cc: linux-nvme

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)

Link: https://lore.kernel.org/all/20261105021051.1667222-1-kanie@linux.alibaba.com/

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(-)

-- 
2.43.7



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2026-11-06 16:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06  2:27 [PATCH v2 0/9] nvme: dead code cleanups Guixin Liu
2026-11-06  2:27 ` [PATCH v2 1/9] nvme-pci: remove write-only NVMEQ_DELETE_ERROR flag Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:12   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 2/9] nvme-fc: remove dead seqno field in nvme_fc_queue Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:16   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 3/9] nvme-auth: remove dead entry field in nvme_dhchap_queue_context Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:16   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 4/9] nvme-fabrics: remove dead hostnqn already-assigned check Guixin Liu
2026-11-06 10:36   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 5/9] nvme: drop unreachable "off" case in reconnect_delay_show() Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 6/9] nvmet-fc: remove dead fields in nvmet_fc_ls_iod and nvmet_fc_tgt_queue Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:17   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 7/9] nvmet: remove unreachable "pcie" entry from the address family map Guixin Liu
2026-11-06 10:37   ` Christoph Hellwig
2026-11-06 13:19   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 8/9] nvmet: passthru: remove unreachable break statements Guixin Liu
2026-11-06 10:38   ` Christoph Hellwig
2026-11-06 13:20   ` Nilay Shroff
2026-11-06  2:27 ` [PATCH v2 9/9] nvmet-pci-epf: don't drain the never-populated SQ list Guixin Liu
2026-11-06 10:38   ` Christoph Hellwig
2026-11-06 13:20   ` Nilay Shroff
2026-11-06 16:13 ` [PATCH v2 0/9] nvme: dead code cleanups Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox