From f55b8d2fd05c3298712fa5c895e16291a9814851 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 29 Dec 2011 14:05:02 +0000 Subject: [PATCH] ib_srpt: Avoid using __WARN() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4041 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 05f9467af..2a2ff0d63 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1473,13 +1473,7 @@ static void srpt_handle_rdma_comp(struct srpt_rdma_ch *ch, } else if (opcode == SRPT_RDMA_ABORT) { ioctx->rdma_aborted = true; } else { -#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); + WARN(true, "scmnd == NULL (opcode %d)", opcode); } } @@ -2674,11 +2668,7 @@ static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id) PRINT_ERROR("Sending DREP failed"); break; default: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) - __WARN(); -#else WARN_ON(true); -#endif break; } } @@ -3188,12 +3178,7 @@ static int srpt_xmit_response(struct scst_cmd *scmnd) ioctx->state = SRPT_STATE_CMD_RSP_SENT; break; default: - PRINT_ERROR("Unexpected command state %d", state); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) - __WARN(); -#else - WARN_ON(true); -#endif + WARN(true, "Unexpected command state %d", state); break; } spin_unlock(&ioctx->spinlock);