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
This commit is contained in:
Bart Van Assche
2018-11-01 03:56:26 +00:00
parent 215501d180
commit ad2e5fc505

View File

@@ -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", &param->primary_path->dgid);
snprintf(sgid, sizeof(sgid), "%pI6", &param->primary_path->dgid);
return srpt_cm_req_recv(cm_id->context, cm_id, NULL, param->port,
param->primary_path->pkey,