* [PATCH] nvmet-fc: Remove unused functions
@ 2025-03-12 5:06 WangYuli
2025-03-12 5:23 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: WangYuli @ 2025-03-12 5:06 UTC (permalink / raw)
To: james.smart, hch, sagi, kch
Cc: linux-nvme, linux-kernel, james_p_freyensee, jthumshirn, zhanjun,
niecheng1, guanwentao, chenlinxuan, WangYuli
The functions nvmet_fc_iodnum() and nvmet_fc_fodnum() are currently
unutilized.
Following commit c53432030d86 ("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: c53432030d86 ("nvme-fabrics: Add target support for FC transport")
Signed-off-by: WangYuli <wangyuli@uniontech.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 3ef4beacde32..7318b736d414 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.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet-fc: Remove unused functions
2025-03-12 5:06 [PATCH] nvmet-fc: Remove unused functions WangYuli
@ 2025-03-12 5:23 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:59 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2025-03-12 5:23 UTC (permalink / raw)
To: WangYuli
Cc: james.smart, hch, sagi, kch, linux-nvme, linux-kernel,
james_p_freyensee, jthumshirn, zhanjun, niecheng1, guanwentao,
chenlinxuan
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet-fc: Remove unused functions
2025-03-12 5:06 [PATCH] nvmet-fc: Remove unused functions WangYuli
2025-03-12 5:23 ` Christoph Hellwig
@ 2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:59 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2025-03-12 17:43 UTC (permalink / raw)
To: WangYuli, james.smart@broadcom.com, hch@lst.de, sagi@grimberg.me,
Chaitanya Kulkarni
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
james_p_freyensee@linux.intel.com, jthumshirn@suse.de,
zhanjun@uniontech.com, niecheng1@uniontech.com,
guanwentao@uniontech.com, chenlinxuan@uniontech.com
On 3/11/25 22:06, WangYuli wrote:
> The functions nvmet_fc_iodnum() and nvmet_fc_fodnum() are currently
> unutilized.
>
> Following commit c53432030d86 ("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: c53432030d86 ("nvme-fabrics: Add target support for FC transport")
> Signed-off-by: WangYuli<wangyuli@uniontech.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet-fc: Remove unused functions
2025-03-12 5:06 [PATCH] nvmet-fc: Remove unused functions WangYuli
2025-03-12 5:23 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
@ 2025-03-12 17:59 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2025-03-12 17:59 UTC (permalink / raw)
To: WangYuli
Cc: james.smart, hch, sagi, kch, linux-nvme, linux-kernel,
james_p_freyensee, jthumshirn, zhanjun, niecheng1, guanwentao,
chenlinxuan
On Wed, Mar 12, 2025 at 01:06:50PM +0800, WangYuli wrote:
> The functions nvmet_fc_iodnum() and nvmet_fc_fodnum() are currently
> unutilized.
>
> Following commit c53432030d86 ("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.
Thanks, applied to nvme-6.15.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-12 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 5:06 [PATCH] nvmet-fc: Remove unused functions WangYuli
2025-03-12 5:23 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:59 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox