2024-03-07 11:02:23

by Colin Ian King

[permalink] [raw]
Subject: [PATCH][next] 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]

Signed-off-by: Colin Ian King <[email protected]>
---
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



2024-03-08 00:13:09

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH][next] nvmet-fc: remove unused functions nvmet_fc_iodnum and nvmet_fc_fodnum

On 3/7/24 03:01, Colin Ian King wrote:
> 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 <[email protected]>
>

Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>

-ck