From ad2e5fc5059238f2a9d55e1c74b56db8e7a265dd Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 1 Nov 2018 03:56:26 +0000 Subject: [PATCH] Move WARN() backport from srpt/src/ib_srpt.c to scst/include/backport.h (merge r7280 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7535 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 68f6a7a3d..d006cf288 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2528,8 +2528,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, struct srpt_rdma_ch *ch = NULL; struct task_struct *thread; u32 it_iu_len; - int i; - int ret; + int i, ret; EXTRACHECKS_WARN_ON_ONCE(irqs_disabled()); @@ -2572,8 +2571,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, } if (!sport->enabled) { - rej->reason = cpu_to_be32( - SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); + rej->reason = cpu_to_be32(SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES); pr_info("rejected SRP_LOGIN_REQ because target port %s has not yet been enabled\n", sport->scst_tgt->tgt_name); goto reject; @@ -2844,7 +2842,7 @@ static int srpt_ib_cm_req_recv(struct ib_cm_id *cm_id, { char sgid[40]; - scnprintf(sgid, sizeof(sgid), "%pI6", ¶m->primary_path->dgid); + snprintf(sgid, sizeof(sgid), "%pI6", ¶m->primary_path->dgid); return srpt_cm_req_recv(cm_id->context, cm_id, NULL, param->port, param->primary_path->pkey,