Skip to content

Commit 5568c6c

Browse files
Avenger-285714vijay-suman
authored andcommitted
nvmet-fc: Remove unused functions
commit 1b304c006b0fb4f0517a8c4ba8c46e88f48a069c upstream. The functions nvmet_fc_iodnum() and nvmet_fc_fodnum() are currently unutilized. Following commit c534320 ("nvme-fabrics: Add target support for FC transport"), which introduced these two functions, they have not been used at all in practice. Remove them to resolve the compiler warnings. Fix follow errors with clang-19 when W=1e: drivers/nvme/target/fc.c:177:1: error: unused function 'nvmet_fc_iodnum' [-Werror,-Wunused-function] 177 | nvmet_fc_iodnum(struct nvmet_fc_ls_iod *iodptr) | ^~~~~~~~~~~~~~~ drivers/nvme/target/fc.c:183:1: error: unused function 'nvmet_fc_fodnum' [-Werror,-Wunused-function] 183 | nvmet_fc_fodnum(struct nvmet_fc_fcp_iod *fodptr) | ^~~~~~~~~~~~~~~ 2 errors generated. make[8]: *** [scripts/Makefile.build:207: drivers/nvme/target/fc.o] Error 1 make[7]: *** [scripts/Makefile.build:465: drivers/nvme/target] Error 2 make[6]: *** [scripts/Makefile.build:465: drivers/nvme] Error 2 make[6]: *** Waiting for unfinished jobs.... Fixes: c534320 ("nvme-fabrics: Add target support for FC transport") Signed-off-by: WangYuli <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit d54fdcf171f0b7d7a9dbeaadd85273b89e6c513d) Signed-off-by: Vijayendra Suman <[email protected]>
1 parent e17c89a commit 5568c6c

File tree

1 file changed

+0
-14
lines changed
  • drivers/nvme/target

1 file changed

+0
-14
lines changed

drivers/nvme/target/fc.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,6 @@ struct nvmet_fc_tgt_assoc {
173173
struct rcu_head rcu;
174174
};
175175

176-
177-
static inline int
178-
nvmet_fc_iodnum(struct nvmet_fc_ls_iod *iodptr)
179-
{
180-
return (iodptr - iodptr->tgtport->iod);
181-
}
182-
183-
static inline int
184-
nvmet_fc_fodnum(struct nvmet_fc_fcp_iod *fodptr)
185-
{
186-
return (fodptr - fodptr->queue->fod);
187-
}
188-
189-
190176
/*
191177
* Association and Connection IDs:
192178
*

0 commit comments

Comments
 (0)