linux/drivers/scsi/qla2xxx
Nathan Chancellor d4781807f0 scsi: qla2xxx: Fix unused variable warning in qla2xxx_process_purls_pkt()
When CONFIG_NVME_FC is not set, fcport is unused:

  drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2xxx_process_purls_pkt':
  drivers/scsi/qla2xxx/qla_nvme.c:1183:20: warning: unused variable 'fcport' [-Wunused-variable]
   1183 |         fc_port_t *fcport = uctx->fcport;
        |                    ^~~~~~

While this preprocessor usage could be converted to a normal if
statement to allow the compiler to always see fcport as used, it is
equally easy to just eliminate the fcport variable and use uctx->fcport
directly.

Fixes: 27177862de ("scsi: qla2xxx: Fix nvme_fc_rcv_ls_req() undefined error")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/linux-next/20230828131304.269a2a40@canb.auug.org.au/
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308290833.sKkoSSeO-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20230829-qla_nvme-fix-unused-fcport-v1-1-51c7560ecaee@kernel.org
Acked-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-08-30 21:13:40 -04:00
..
Kconfig scsi: Add HAS_IOPORT dependencies 2023-05-31 19:59:26 -04:00
Makefile scsi: qla2xxx: edif: Add start + stop bsgs 2021-07-27 00:06:42 -04:00
qla_attr.c scsi: qla2xxx: Remove unsupported ql2xenabledif option 2023-08-21 17:45:15 -04:00
qla_bsg.c scsi: qla2xxx: Pointer may be dereferenced 2023-06-14 22:06:02 -04:00
qla_bsg.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_dbg.c scsi: qla2xxx: Remove unsupported ql2xenabledif option 2023-08-21 17:45:15 -04:00
qla_dbg.h scsi: qla2xxx: Add Unsolicited LS Request and Response Support for NVMe 2023-08-21 17:45:14 -04:00
qla_def.h Merge branch '6.5/scsi-fixes' into 6.6/scsi-staging 2023-08-30 20:56:24 -04:00
qla_devtbl.h
qla_dfs.c scsi: qla2xxx: Fix firmware resource tracking 2023-08-21 17:45:14 -04:00
qla_dsd.h
qla_edif_bsg.h scsi: qla2xxx: edif: Fix clang warning 2023-01-11 23:48:26 -05:00
qla_edif.c scsi: qla2xxx: Avoid fcport pointer dereference 2023-06-14 22:06:01 -04:00
qla_edif.h scsi: qla2xxx: Relocate/rename vp map 2023-01-11 23:48:25 -05:00
qla_fw.h scsi: qla2xxx: Add NVMe parameters support in Auxiliary Image Status 2022-09-01 00:30:55 -04:00
qla_gbl.h Merge patch series "qla2xxx driver misc features" 2023-08-25 17:07:34 -04:00
qla_gs.c scsi: qla2xxx: Replace one-element array with DECLARE_FLEX_ARRAY() helper 2023-06-07 21:27:28 -04:00
qla_init.c Merge branch '6.5/scsi-fixes' into 6.6/scsi-staging 2023-08-30 20:56:24 -04:00
qla_inline.h scsi: qla2xxx: Fix firmware resource tracking 2023-08-21 17:45:14 -04:00
qla_iocb.c Merge branch '6.5/scsi-fixes' into 6.6/scsi-staging 2023-08-30 20:56:24 -04:00
qla_isr.c scsi: qla2xxx: Add logs for SFP temperature monitoring 2023-08-21 17:45:14 -04:00
qla_mbx.c scsi: qla2xxx: Flush mailbox commands on chip reset 2023-08-21 17:45:14 -04:00
qla_mid.c scsi: qla2xxx: Declare SCSI host template const 2023-03-24 19:19:59 -04:00
qla_mr.c scsi: qla2xxx: Replace all non-returning strlcpy() with strscpy() 2023-05-16 21:41:34 -04:00
qla_mr.h
qla_nvme.c scsi: qla2xxx: Fix unused variable warning in qla2xxx_process_purls_pkt() 2023-08-30 21:13:40 -04:00
qla_nvme.h scsi: qla2xxx: Add Unsolicited LS Request and Response Support for NVMe 2023-08-21 17:45:14 -04:00
qla_nx2.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx2.h
qla_nx.c scsi: qla2xxx: Use named initializers for q_dev_state 2022-02-22 21:11:07 -05:00
qla_nx.h scsi: qla2xxx: Allow 32-byte CDBs 2023-08-21 17:37:42 -04:00
qla_os.c scsi: qla2xxx: Remove unsupported ql2xenabledif option 2023-08-21 17:45:15 -04:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Add devids and conditionals for 28xx 2022-01-24 23:57:32 -05:00
qla_target.c scsi: qla2xxx: Fix deletion race condition 2023-07-23 16:27:46 -04:00
qla_target.h scsi: qla2xxx: Relocate/rename vp map 2023-01-11 23:48:25 -05:00
qla_tmpl.c scsi: qla2xxx: Fix premature hw access after PCI error 2022-01-24 23:57:30 -05:00
qla_tmpl.h
qla_version.h scsi: qla2xxx: Update version to 10.02.09.100-k 2023-08-21 17:45:15 -04:00
tcm_qla2xxx.c scsi: qla2xxx: Remove default fabric ops callouts 2023-03-16 23:36:36 -04:00
tcm_qla2xxx.h