Skip to contentSkip to conversation

nvmet-fc: remove unused functions nvmet_fc_iodnum and nvmet_fc_fodnum

PATCH In review Colin Ian King 3 participants 3 messages Mar 7, 2024 – Mar 8, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmet-fc: remove unused functions nvmet_fc_iodnum and nvmet_fc_fodnum

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]

---
 drivers/nvme/target/fc.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/nvme/target/fc.c +0 -14
index fd229f310c93..a19fa50c840b 100644
@@ -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:
  *
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Colin Ian King
Quoted 10 lines · Colin Ian King

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]

Looks good.

-ck