Commit 457ff3b7 authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley

[SCSI] be2iscsi: Fix warnings from new checkpatch.pl

The latest checkpatch.pl throws some new warnings. Fixing it
to get rid of a bunch of warnings
Signed-off-by: default avatarJayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent bbe56c73
...@@ -151,7 +151,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba, ...@@ -151,7 +151,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
{ {
switch (evt->port_link_status) { switch (evt->port_link_status) {
case ASYNC_EVENT_LINK_DOWN: case ASYNC_EVENT_LINK_DOWN:
SE_DEBUG(DBG_LVL_1, "Link Down on Physical Port %d \n", SE_DEBUG(DBG_LVL_1, "Link Down on Physical Port %d\n",
evt->physical_port); evt->physical_port);
phba->state |= BE_ADAPTER_LINK_DOWN; phba->state |= BE_ADAPTER_LINK_DOWN;
iscsi_host_for_each_session(phba->shost, iscsi_host_for_each_session(phba->shost,
...@@ -159,12 +159,12 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba, ...@@ -159,12 +159,12 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
break; break;
case ASYNC_EVENT_LINK_UP: case ASYNC_EVENT_LINK_UP:
phba->state = BE_ADAPTER_UP; phba->state = BE_ADAPTER_UP;
SE_DEBUG(DBG_LVL_1, "Link UP on Physical Port %d \n", SE_DEBUG(DBG_LVL_1, "Link UP on Physical Port %d\n",
evt->physical_port); evt->physical_port);
break; break;
default: default:
SE_DEBUG(DBG_LVL_1, "Unexpected Async Notification %d on" SE_DEBUG(DBG_LVL_1, "Unexpected Async Notification %d on"
"Physical Port %d \n", "Physical Port %d\n",
evt->port_link_status, evt->port_link_status,
evt->physical_port); evt->physical_port);
} }
...@@ -199,7 +199,7 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba) ...@@ -199,7 +199,7 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
else else
SE_DEBUG(DBG_LVL_1, SE_DEBUG(DBG_LVL_1,
" Unsupported Async Event, flags" " Unsupported Async Event, flags"
" = 0x%08x \n", compl->flags); " = 0x%08x\n", compl->flags);
} else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) { } else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) {
status = be_mcc_compl_process(ctrl, compl); status = be_mcc_compl_process(ctrl, compl);
...@@ -286,7 +286,7 @@ int be_mbox_notify(struct be_ctrl_info *ctrl) ...@@ -286,7 +286,7 @@ int be_mbox_notify(struct be_ctrl_info *ctrl)
status = be_mbox_db_ready_wait(ctrl); status = be_mbox_db_ready_wait(ctrl);
if (status != 0) { if (status != 0) {
SE_DEBUG(DBG_LVL_1, " be_mbox_db_ready_wait failed 1\n"); SE_DEBUG(DBG_LVL_1, " be_mbox_db_ready_wait failed\n");
return status; return status;
} }
val = 0; val = 0;
...@@ -297,14 +297,14 @@ int be_mbox_notify(struct be_ctrl_info *ctrl) ...@@ -297,14 +297,14 @@ int be_mbox_notify(struct be_ctrl_info *ctrl)
status = be_mbox_db_ready_wait(ctrl); status = be_mbox_db_ready_wait(ctrl);
if (status != 0) { if (status != 0) {
SE_DEBUG(DBG_LVL_1, " be_mbox_db_ready_wait failed 2\n"); SE_DEBUG(DBG_LVL_1, " be_mbox_db_ready_wait failed\n");
return status; return status;
} }
if (be_mcc_compl_is_new(compl)) { if (be_mcc_compl_is_new(compl)) {
status = be_mcc_compl_process(ctrl, &mbox->compl); status = be_mcc_compl_process(ctrl, &mbox->compl);
be_mcc_compl_use(compl); be_mcc_compl_use(compl);
if (status) { if (status) {
SE_DEBUG(DBG_LVL_1, "After be_mcc_compl_process \n"); SE_DEBUG(DBG_LVL_1, "After be_mcc_compl_process\n");
return status; return status;
} }
} else { } else {
...@@ -500,7 +500,7 @@ int be_cmd_fw_initialize(struct be_ctrl_info *ctrl) ...@@ -500,7 +500,7 @@ int be_cmd_fw_initialize(struct be_ctrl_info *ctrl)
status = be_mbox_notify(ctrl); status = be_mbox_notify(ctrl);
if (status) if (status)
SE_DEBUG(DBG_LVL_1, "be_cmd_fw_initialize Failed \n"); SE_DEBUG(DBG_LVL_1, "be_cmd_fw_initialize Failed\n");
spin_unlock(&ctrl->mbox_lock); spin_unlock(&ctrl->mbox_lock);
return status; return status;
...@@ -517,7 +517,7 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl, ...@@ -517,7 +517,7 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
void *ctxt = &req->context; void *ctxt = &req->context;
int status; int status;
SE_DEBUG(DBG_LVL_8, "In beiscsi_cmd_cq_create \n"); SE_DEBUG(DBG_LVL_8, "In beiscsi_cmd_cq_create\n");
spin_lock(&ctrl->mbox_lock); spin_lock(&ctrl->mbox_lock);
memset(wrb, 0, sizeof(*wrb)); memset(wrb, 0, sizeof(*wrb));
...@@ -550,7 +550,7 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl, ...@@ -550,7 +550,7 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
cq->id = le16_to_cpu(resp->cq_id); cq->id = le16_to_cpu(resp->cq_id);
cq->created = true; cq->created = true;
} else } else
SE_DEBUG(DBG_LVL_1, "In be_cmd_cq_create, status=ox%08x \n", SE_DEBUG(DBG_LVL_1, "In be_cmd_cq_create, status=ox%08x\n",
status); status);
spin_unlock(&ctrl->mbox_lock); spin_unlock(&ctrl->mbox_lock);
...@@ -619,7 +619,7 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, ...@@ -619,7 +619,7 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
u8 subsys = 0, opcode = 0; u8 subsys = 0, opcode = 0;
int status; int status;
SE_DEBUG(DBG_LVL_8, "In beiscsi_cmd_q_destroy \n"); SE_DEBUG(DBG_LVL_8, "In beiscsi_cmd_q_destroy\n");
spin_lock(&ctrl->mbox_lock); spin_lock(&ctrl->mbox_lock);
memset(wrb, 0, sizeof(*wrb)); memset(wrb, 0, sizeof(*wrb));
be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);
......
...@@ -52,7 +52,7 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep, ...@@ -52,7 +52,7 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
SE_DEBUG(DBG_LVL_8, "In beiscsi_session_create\n"); SE_DEBUG(DBG_LVL_8, "In beiscsi_session_create\n");
if (!ep) { if (!ep) {
SE_DEBUG(DBG_LVL_1, "beiscsi_session_create: invalid ep \n"); SE_DEBUG(DBG_LVL_1, "beiscsi_session_create: invalid ep\n");
return NULL; return NULL;
} }
beiscsi_ep = ep->dd_data; beiscsi_ep = ep->dd_data;
...@@ -157,7 +157,7 @@ static int beiscsi_bindconn_cid(struct beiscsi_hba *phba, ...@@ -157,7 +157,7 @@ static int beiscsi_bindconn_cid(struct beiscsi_hba *phba,
"Connection table already occupied. Detected clash\n"); "Connection table already occupied. Detected clash\n");
return -EINVAL; return -EINVAL;
} else { } else {
SE_DEBUG(DBG_LVL_8, "phba->conn_table[%d]=%p(beiscsi_conn) \n", SE_DEBUG(DBG_LVL_8, "phba->conn_table[%d]=%p(beiscsi_conn)\n",
cid, beiscsi_conn); cid, beiscsi_conn);
phba->conn_table[cid] = beiscsi_conn; phba->conn_table[cid] = beiscsi_conn;
} }
...@@ -196,7 +196,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, ...@@ -196,7 +196,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
if (beiscsi_ep->phba != phba) { if (beiscsi_ep->phba != phba) {
SE_DEBUG(DBG_LVL_8, SE_DEBUG(DBG_LVL_8,
"beiscsi_ep->hba=%p not equal to phba=%p \n", "beiscsi_ep->hba=%p not equal to phba=%p\n",
beiscsi_ep->phba, phba); beiscsi_ep->phba, phba);
return -EEXIST; return -EEXIST;
} }
...@@ -204,7 +204,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, ...@@ -204,7 +204,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid; beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid;
beiscsi_conn->ep = beiscsi_ep; beiscsi_conn->ep = beiscsi_ep;
beiscsi_ep->conn = beiscsi_conn; beiscsi_ep->conn = beiscsi_conn;
SE_DEBUG(DBG_LVL_8, "beiscsi_conn=%p conn=%p ep_cid=%d \n", SE_DEBUG(DBG_LVL_8, "beiscsi_conn=%p conn=%p ep_cid=%d\n",
beiscsi_conn, conn, beiscsi_ep->ep_cid); beiscsi_conn, conn, beiscsi_ep->ep_cid);
return beiscsi_bindconn_cid(phba, beiscsi_conn, beiscsi_ep->ep_cid); return beiscsi_bindconn_cid(phba, beiscsi_conn, beiscsi_ep->ep_cid);
} }
...@@ -308,7 +308,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost, ...@@ -308,7 +308,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
case ISCSI_HOST_PARAM_HWADDRESS: case ISCSI_HOST_PARAM_HWADDRESS:
tag = be_cmd_get_mac_addr(phba); tag = be_cmd_get_mac_addr(phba);
if (!tag) { if (!tag) {
SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed \n"); SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed\n");
return -1; return -1;
} else } else
wait_event_interruptible(phba->ctrl.mcc_wait[tag], wait_event_interruptible(phba->ctrl.mcc_wait[tag],
...@@ -319,7 +319,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost, ...@@ -319,7 +319,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; status = phba->ctrl.mcc_numtag[tag] & 0x000000FF;
if (status || extd_status) { if (status || extd_status) {
SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed" SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed"
" status = %d extd_status = %d \n", " status = %d extd_status = %d\n",
status, extd_status); status, extd_status);
free_mcc_tag(&phba->ctrl, tag); free_mcc_tag(&phba->ctrl, tag);
return -1; return -1;
...@@ -493,7 +493,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, ...@@ -493,7 +493,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
SE_DEBUG(DBG_LVL_1, "No free cid available\n"); SE_DEBUG(DBG_LVL_1, "No free cid available\n");
return ret; return ret;
} }
SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn, ep_cid=%d ", SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn, ep_cid=%d\n",
beiscsi_ep->ep_cid); beiscsi_ep->ep_cid);
phba->ep_array[beiscsi_ep->ep_cid - phba->ep_array[beiscsi_ep->ep_cid -
phba->fw_config.iscsi_cid_start] = ep; phba->fw_config.iscsi_cid_start] = ep;
...@@ -507,7 +507,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, ...@@ -507,7 +507,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep); tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep);
if (!tag) { if (!tag) {
SE_DEBUG(DBG_LVL_1, SE_DEBUG(DBG_LVL_1,
"mgmt_open_connection Failed for cid=%d \n", "mgmt_open_connection Failed for cid=%d\n",
beiscsi_ep->ep_cid); beiscsi_ep->ep_cid);
} else { } else {
wait_event_interruptible(phba->ctrl.mcc_wait[tag], wait_event_interruptible(phba->ctrl.mcc_wait[tag],
...@@ -556,18 +556,18 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, ...@@ -556,18 +556,18 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
struct iscsi_endpoint *ep; struct iscsi_endpoint *ep;
int ret; int ret;
SE_DEBUG(DBG_LVL_8, "In beiscsi_ep_connect \n"); SE_DEBUG(DBG_LVL_8, "In beiscsi_ep_connect\n");
if (shost) if (shost)
phba = iscsi_host_priv(shost); phba = iscsi_host_priv(shost);
else { else {
ret = -ENXIO; ret = -ENXIO;
SE_DEBUG(DBG_LVL_1, "shost is NULL \n"); SE_DEBUG(DBG_LVL_1, "shost is NULL\n");
return ERR_PTR(ret); return ERR_PTR(ret);
} }
if (phba->state != BE_ADAPTER_UP) { if (phba->state != BE_ADAPTER_UP) {
ret = -EBUSY; ret = -EBUSY;
SE_DEBUG(DBG_LVL_1, "The Adapter state is Not UP \n"); SE_DEBUG(DBG_LVL_1, "The Adapter state is Not UP\n");
return ERR_PTR(ret); return ERR_PTR(ret);
} }
...@@ -581,7 +581,7 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, ...@@ -581,7 +581,7 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
beiscsi_ep->phba = phba; beiscsi_ep->phba = phba;
beiscsi_ep->openiscsi_ep = ep; beiscsi_ep->openiscsi_ep = ep;
if (beiscsi_open_conn(ep, NULL, dst_addr, non_blocking)) { if (beiscsi_open_conn(ep, NULL, dst_addr, non_blocking)) {
SE_DEBUG(DBG_LVL_1, "Failed in beiscsi_open_conn \n"); SE_DEBUG(DBG_LVL_1, "Failed in beiscsi_open_conn\n");
ret = -ENOMEM; ret = -ENOMEM;
goto free_ep; goto free_ep;
} }
...@@ -624,7 +624,7 @@ static int beiscsi_close_conn(struct beiscsi_endpoint *beiscsi_ep, int flag) ...@@ -624,7 +624,7 @@ static int beiscsi_close_conn(struct beiscsi_endpoint *beiscsi_ep, int flag)
tag = mgmt_upload_connection(phba, beiscsi_ep->ep_cid, flag); tag = mgmt_upload_connection(phba, beiscsi_ep->ep_cid, flag);
if (!tag) { if (!tag) {
SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x", SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x\n",
beiscsi_ep->ep_cid); beiscsi_ep->ep_cid);
ret = -1; ret = -1;
} else { } else {
...@@ -646,7 +646,7 @@ static int beiscsi_unbind_conn_to_cid(struct beiscsi_hba *phba, ...@@ -646,7 +646,7 @@ static int beiscsi_unbind_conn_to_cid(struct beiscsi_hba *phba,
if (phba->conn_table[cid]) if (phba->conn_table[cid])
phba->conn_table[cid] = NULL; phba->conn_table[cid] = NULL;
else { else {
SE_DEBUG(DBG_LVL_8, "Connection table Not occupied. \n"); SE_DEBUG(DBG_LVL_8, "Connection table Not occupied.\n");
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -687,7 +687,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) ...@@ -687,7 +687,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)
savecfg_flag); savecfg_flag);
if (!tag) { if (!tag) {
SE_DEBUG(DBG_LVL_1, SE_DEBUG(DBG_LVL_1,
"mgmt_invalidate_connection Failed for cid=%d \n", "mgmt_invalidate_connection Failed for cid=%d\n",
beiscsi_ep->ep_cid); beiscsi_ep->ep_cid);
} else { } else {
wait_event_interruptible(phba->ctrl.mcc_wait[tag], wait_event_interruptible(phba->ctrl.mcc_wait[tag],
......
This diff is collapsed.
...@@ -58,7 +58,7 @@ unsigned char mgmt_get_fw_config(struct be_ctrl_info *ctrl, ...@@ -58,7 +58,7 @@ unsigned char mgmt_get_fw_config(struct be_ctrl_info *ctrl,
} }
} else { } else {
shost_printk(KERN_WARNING, phba->shost, shost_printk(KERN_WARNING, phba->shost,
"Failed in mgmt_get_fw_config \n"); "Failed in mgmt_get_fw_config\n");
} }
spin_unlock(&ctrl->mbox_lock); spin_unlock(&ctrl->mbox_lock);
...@@ -167,7 +167,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, ...@@ -167,7 +167,7 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
&nonemb_cmd.dma); &nonemb_cmd.dma);
if (nonemb_cmd.va == NULL) { if (nonemb_cmd.va == NULL) {
SE_DEBUG(DBG_LVL_1, SE_DEBUG(DBG_LVL_1,
"Failed to allocate memory for mgmt_invalidate_icds\n"); "Failed to alloc memory for mgmt_invalidate_icds\n");
spin_unlock(&ctrl->mbox_lock); spin_unlock(&ctrl->mbox_lock);
return 0; return 0;
} }
...@@ -339,7 +339,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba, ...@@ -339,7 +339,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
if (phba->nxt_cqid == phba->num_cpus) if (phba->nxt_cqid == phba->num_cpus)
phba->nxt_cqid = 0; phba->nxt_cqid = 0;
req->cq_id = phwi_context->be_cq[i].id; req->cq_id = phwi_context->be_cq[i].id;
SE_DEBUG(DBG_LVL_8, "i=%d cq_id=%d \n", i, req->cq_id); SE_DEBUG(DBG_LVL_8, "i=%d cq_id=%d\n", i, req->cq_id);
req->defq_id = def_hdr_id; req->defq_id = def_hdr_id;
req->hdr_ring_id = def_hdr_id; req->hdr_ring_id = def_hdr_id;
req->data_ring_id = def_data_id; req->data_ring_id = def_data_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment