From 6fdc0baaaa215be773d03d09fda5226ca96c9d21 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 4 Jun 2011 18:10:45 +0000 Subject: [PATCH] ib_srpt: Build fix for non-RHEL pre-2.6.25 kernels. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3538 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 2bfc52794..b7862af09 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2592,7 +2592,11 @@ static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id) PRINT_ERROR("%s", "Sending DREP failed"); break; default: +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) __WARN(); +#else + WARN_ON(true); +#endif break; } out: @@ -3050,7 +3054,11 @@ static int srpt_xmit_response(struct scst_cmd *scmnd) break; default: PRINT_ERROR("Unexpected command state %d", state); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) __WARN(); +#else + WARN_ON(true); +#endif break; } spin_unlock(&ioctx->spinlock);