From: Gleb C. <lna...@ya...> - 2023-10-10 12:12:39
|
Commit: 785ac55 GitHub URL: https://github.com/SCST-project/scst/commit/785ac55de75e9cb3273ef02ba70ee585892234b0 Author: Gleb Chesnokov Date: 2023-10-10T15:10:02+03:00 Log Message: ----------- qla2x00t-32gbit: 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: 27177862de96 ("scsi: qla2xxx: Fix nvme_fc_rcv_ls_req() undefined error") Reported-by: Stephen Rothwell <sf...@ca...> Closes: https://lore.kernel.org/linux-next/202...@ca.../ Reported-by: kernel test robot <lk...@in...> Closes: https://lore.kernel.org/oe-kbuild-all/202...@in.../ Signed-off-by: Nathan Chancellor <na...@ke...> Link: https://lore.kernel.org/r/202...@ke... Acked-by: Nilesh Javali <nj...@ma...> Reviewed-by: Bart Van Assche <bva...@ac...> Signed-off-by: Martin K. Petersen <mar...@or...> [ commit d4781807f050 upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_nvme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_nvme.c b/qla2x00t-32gbit/qla_nvme.c index da703c6..8cb9375 100644 --- a/qla2x00t-32gbit/qla_nvme.c +++ b/qla2x00t-32gbit/qla_nvme.c @@ -1132,12 +1132,11 @@ static void qla2xxx_process_purls_pkt(struct scsi_qla_host *vha, struct purex_item *item) { struct qla_nvme_unsol_ctx *uctx = item->purls_context; - fc_port_t *fcport = uctx->fcport; struct qla_nvme_lsrjt_pt_arg a; int ret = 1; #if (IS_ENABLED(CONFIG_NVME_FC)) - ret = nvme_fc_rcv_ls_req(fcport->nvme_remote_port, &uctx->lsrsp, + ret = nvme_fc_rcv_ls_req(uctx->fcport->nvme_remote_port, &uctx->lsrsp, &item->iocb, item->size); #endif if (ret) { |