scsi: fnic: Fix built-in NVMe/FC build
Subsystems (2)
Karan Tilak Kumar
maintainerPATCH 1/1 scsi: fnic: Fix built-in NVMe/FC build
The fnic NVMe/FC code is guarded with IS_ENABLED(CONFIG_NVME_FC). That also evaluates true when NVME_FC is built as a module.
When fnic is built into vmlinux and NVME_FC=m, fnic_nvme.o still references the NVMe/FC transport helpers even though those helpers are not reachable from built-in code. The final vmlinux link then fails with undefined nvme_fc_* symbols.
Use IS_REACHABLE(CONFIG_NVME_FC) for the fnic NVMe/FC implementation and prototypes so built-in fnic uses the disabled stubs unless the NVMe/FC transport is reachable.
Reported-by kernel test robot <[email protected]>
Reviewed-by Sesidhar Baddela <[email protected]>
Reviewed-by Arulprabhu Ponnusamy <[email protected]>
Reviewed-by Gian Carlo Boffa <[email protected]>
Reviewed-by Arun Easi <[email protected]>
Signed-off-by Karan Tilak Kumar <[email protected]>
--- drivers/scsi/fnic/fnic_nvme.c | 2 +- drivers/scsi/fnic/fnic_nvme.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/fnic/fnic_nvme.c +1 -1
@@ -22,7 +22,7 @@#include "fnic_trace.h" #include "fdls_fc.h" -#if IS_ENABLED (CONFIG_NVME_FC ) +#if IS_REACHABLE (CONFIG_NVME_FC ) static bool nvfnic_ls_req_cleanup(struct fnic_iport_s *iport, struct nvmefc_ls_req *lsreq,
drivers/scsi/fnic/fnic_nvme.h +1 -1
@@ -61,7 +61,7 @@ struct nvfnic_ls_req {unsigned int flags; }; -#if IS_ENABLED (CONFIG_NVME_FC ) +#if IS_REACHABLE (CONFIG_NVME_FC )int nvfnic_nvme_io_done_handler (void *arg);struct fnic_io_req *nvfnic_find_io_req_by_tag (struct fnic *fnic,uint16_t tag);void nvfnic_reset_fcpio_tag_pool (struct fnic_iport_s *iport);
Signature · 1 line
2.47.1
Karan,
Quoted 2 lines
The fnic NVMe/FC code is guarded with
IS_ENABLED(CONFIG_NVME_FC). That also evaluates true whenNVME_FCis built as a module.
Applied to 7.3/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen