[PATCH v10 07/11] scsi: scsi_transport_fc: add fc_host_fpin_set_nvme_rport_marginal()

Justin Tee justintee8345 at gmail.com
Mon Sep 29 10:45:40 PDT 2025


Hi John,

> +       u64 local_wwpn = fc_host_port_name(shost);
If CONFIG_NVME_FC is not enabled, then the u64 local_wwpn variables
aren’t used anywhere.

drivers/scsi/scsi_transport_fc.c: In function
‘fc_host_fpin_set_nvme_rport_marginal’:
drivers/scsi/scsi_transport_fc.c:900:13: warning: unused variable
‘local_wwpn’ [-Wunused-variable]
  900 |         u64 local_wwpn = fc_host_port_name(shost);
      |             ^~~~~~~~~~
drivers/scsi/scsi_transport_fc.c: In function ‘fc_rport_set_marginal_state’:
drivers/scsi/scsi_transport_fc.c:1309:13: warning: unused variable
‘local_wwpn’ [-Wunused-variable]
 1309 |         u64 local_wwpn = fc_host_port_name(shost);
      |             ^~~~~~~~~~

Perhaps we need to ifdef the u64 local_wwpn declarations in both
fc_host_fpin_set_nvme_rport_marginal and fc_rport_set_marginal_state
routines too?

#if (IS_ENABLED(CONFIG_NVME_FC))
u64 local_wwpn = fc_host_port_name(shost);
#endif

Regards,
Justin



More information about the Linux-nvme mailing list