From cba8f3ab7ee83d47aff2e7dca2dc5df1e08646c0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 16 Sep 2015 16:43:32 +0000 Subject: [PATCH] ib_srpt: Build fix for the nightly build against kernel v4.2 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6507 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 6929da468..6c9a9bbc0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -627,7 +627,9 @@ static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent, #endif 0, IB_MGMT_DEVICE_HDR, IB_MGMT_DEVICE_DATA, GFP_KERNEL -#ifdef CREATE_SEND_MAD_HAS_BASE_ARG +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) || \ + defined(CREATE_SEND_MAD_HAS_BASE_ARG) + , 0 #endif ); @@ -2181,11 +2183,12 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) if (!qp_init) goto out; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) \ - && !defined(RHEL_RELEASE_CODE) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) && \ + !defined(RHEL_RELEASE_CODE) ch->cq = ib_create_cq(sdev->device, srpt_completion, NULL, ch, ch->rq_size + srpt_sq_size); -#elif !defined(IB_CREATE_CQ_HAS_INIT_ATTR) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) && \ + !defined(IB_CREATE_CQ_HAS_INIT_ATTR) ch->cq = ib_create_cq(sdev->device, srpt_completion, NULL, ch, ch->rq_size + srpt_sq_size, ch->comp_vector); #else