[PATCH][next] nvmet-fc: remove unused functions nvmet_fc_iodnum and nvmet_fc_fodnum

Colin Ian King colin.i.king at gmail.com
Thu Mar 7 03:01:58 PST 2024


The inlined helper functions nvmet_fc_iodnum and nvmet_fc_fodnum are
not used and are redundant. They have been in the code since 2016 and
never been referenced. Remove them.

Cleans up clang scan warnings such as:
drivers/nvme/target/fc.c:177:1: warning: unused function
'nvmet_fc_iodnum' [-Wunused-function]

Signed-off-by: Colin Ian King <colin.i.king at gmail.com>
---
 drivers/nvme/target/fc.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index fd229f310c93..a19fa50c840b 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -172,20 +172,6 @@ struct nvmet_fc_tgt_assoc {
 	struct work_struct		del_work;
 };
 
-
-static inline int
-nvmet_fc_iodnum(struct nvmet_fc_ls_iod *iodptr)
-{
-	return (iodptr - iodptr->tgtport->iod);
-}
-
-static inline int
-nvmet_fc_fodnum(struct nvmet_fc_fcp_iod *fodptr)
-{
-	return (fodptr - fodptr->queue->fod);
-}
-
-
 /*
  * Association and Connection IDs:
  *
-- 
2.39.2




More information about the Linux-nvme mailing list