From 289ae036e5003a069fc877c637260d9bfafe8ab2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 9 May 2020 15:11:05 +0000 Subject: [PATCH 1/2] qla2x00t-32gbit: Fix a compiler warning triggered by kernel versions before v4.10 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8878 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_isr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_isr.c b/qla2x00t-32gbit/qla_isr.c index 37986c74c..d1eed5f60 100644 --- a/qla2x00t-32gbit/qla_isr.c +++ b/qla2x00t-32gbit/qla_isr.c @@ -2170,10 +2170,11 @@ static void qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, } if (state_flags & SF_NVME_ERSP) { - struct nvme_fc_ersp_iu *rsp_iu = fd->rspaddr; u32 tgt_xfer_len; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) + struct nvme_fc_ersp_iu *rsp_iu = fd->rspaddr; + /* * xfrd_len was introduced by commit b1ad1475b447 * ("nvme-fabrics: Add FC transport FC-NVME definitions") From f4ce28b5abbcfaf2aeab5eedee861543d404786d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 9 May 2020 15:11:29 +0000 Subject: [PATCH 2/2] scst/include/backport.h: Unbreak the build on RHEL 7 / CentOS 7 Fixes: 5ebd20d839d0 ("scst/include/backport.h: Backport cpu_to_be32_array()") git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8879 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 6d1aeaef4..851121d0b 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -187,7 +187,8 @@ static inline void *bsg_job_sense(struct bsg_job *job) * See also f2f2efb807d3 ("byteorder: Move {cpu_to_be32, be32_to_cpu}_array() * from Thunderbolt to core") # v4.15. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) { int i;