From cd563e1fb700183ac0d3f3989922dd92b6de8c68 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 8 Nov 2011 19:50:31 +0000 Subject: [PATCH] ib_srpt: Change one occurrence of WARN_ON() into __WARN(). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3916 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 470cd82de..fa7a4a6c0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1473,7 +1473,11 @@ static void srpt_handle_rdma_comp(struct srpt_rdma_ch *ch, } else if (opcode == SRPT_RDMA_ABORT) { ioctx->rdma_aborted = true; } else { - WARN_ON(opcode != SRPT_RDMA_READ_LAST); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) + __WARN(); +#else + WARN_ON(true); +#endif PRINT_ERROR("%s[%d]: scmnd == NULL (opcode %d)", __func__, __LINE__, opcode); }