[SCSI] qla2xxx: General checkpatch corrections.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Andrew Vasquez 2010-03-19 17:04:02 -07:00 committed by James Bottomley
parent bfdaa761d3
commit 6c452a45e5
5 changed files with 69 additions and 60 deletions

View File

@ -1177,15 +1177,13 @@ qla24xx_84xx_fw_version_show(struct device *dev,
scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
struct qla_hw_data *ha = vha->hw;
if (IS_QLA84XX(ha) && ha->cs84xx) {
if (ha->cs84xx->op_fw_version == 0) {
if (IS_QLA84XX(ha) && ha->cs84xx)
if (ha->cs84xx->op_fw_version == 0)
rval = qla84xx_verify_chip(vha, status);
}
if ((rval == QLA_SUCCESS) && (status[0] == 0))
return snprintf(buf, PAGE_SIZE, "%u\n",
(uint32_t)ha->cs84xx->op_fw_version);
}
return snprintf(buf, PAGE_SIZE, "\n");
}

View File

@ -286,6 +286,7 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)
rval = -ENOMEM;
goto done_free_fcport;
}
rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, bsg_job->reply_payload.sg_list,
bsg_job->reply_payload.sg_cnt, DMA_FROM_DEVICE);
if (!rsp_sg_cnt) {
@ -294,8 +295,7 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job)
}
if ((req_sg_cnt != bsg_job->request_payload.sg_cnt) ||
(rsp_sg_cnt != bsg_job->reply_payload.sg_cnt))
{
(rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) {
DEBUG2(printk(KERN_INFO
"dma mapping resulted in different sg counts \
[request_sg_cnt: %x dma_request_sg_cnt: %x\
@ -388,8 +388,7 @@ qla2x00_process_ct(struct fc_bsg_job *bsg_job)
}
if ((req_sg_cnt != bsg_job->request_payload.sg_cnt) ||
(rsp_sg_cnt != bsg_job->reply_payload.sg_cnt))
{
(rsp_sg_cnt != bsg_job->reply_payload.sg_cnt)) {
DEBUG2(qla_printk(KERN_WARNING, ha,
"[request_sg_cnt: %x dma_request_sg_cnt: %x\
reply_sg_cnt: %x dma_reply_sg_cnt: %x]\n",
@ -429,8 +428,7 @@ qla2x00_process_ct(struct fc_bsg_job *bsg_job)
* no fcport structure allocated
*/
fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
if (!fcport)
{
if (!fcport) {
rval = -ENOMEM;
goto done_unmap_sg;
}
@ -975,7 +973,8 @@ qla84xx_mgmt_cmd(struct fc_bsg_job *bsg_job)
bsg_job->reply_payload.payload_len;
sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
bsg_job->reply_payload.sg_cnt, mgmt_b, data_len);
bsg_job->reply_payload.sg_cnt, mgmt_b,
data_len);
}
}
@ -1062,7 +1061,8 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job)
if (rval) {
DEBUG16(printk(KERN_ERR "scsi(%ld): iIDMA cmd failed for "
"%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x %04x.\n",
"%02x%02x%02x%02x%02x%02x%02x%02x -- "
"%04x %x %04x %04x.\n",
vha->host_no, fcport->port_name[0],
fcport->port_name[1],
fcport->port_name[2], fcport->port_name[3],
@ -1166,7 +1166,6 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
sp = req->outstanding_cmds[cnt];
if (sp) {
sp_bsg = (struct srb_bsg *)sp->ctx;
@ -1175,12 +1174,16 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job)
&& (sp_bsg->bsg_job == bsg_job)) {
if (ha->isp_ops->abort_command(sp)) {
DEBUG2(qla_printk(KERN_INFO, ha,
"scsi(%ld): mbx abort_command failed\n", vha->host_no));
"scsi(%ld): mbx "
"abort_command failed\n",
vha->host_no));
bsg_job->req->errors =
bsg_job->reply->result = -EIO;
} else {
DEBUG2(qla_printk(KERN_INFO, ha,
"scsi(%ld): mbx abort_command success\n", vha->host_no));
"scsi(%ld): mbx "
"abort_command success\n",
vha->host_no));
bsg_job->req->errors =
bsg_job->reply->result = 0;
}

View File

@ -1130,18 +1130,26 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
qla2x00_sp_compl(ha, sp);
} else {
ctx = sp->ctx;
if (ctx->type == SRB_LOGIN_CMD || ctx->type == SRB_LOGOUT_CMD) {
if (ctx->type == SRB_LOGIN_CMD ||
ctx->type == SRB_LOGOUT_CMD) {
del_timer_sync(&ctx->timer);
ctx->free(sp);
} else {
struct srb_bsg* sp_bsg = (struct srb_bsg*)sp->ctx;
if (sp_bsg->bsg_job->request->msgcode == FC_BSG_HST_CT)
struct srb_bsg *sp_bsg =
(struct srb_bsg *)sp->ctx;
struct fc_bsg_job *bsg_job =
sp_bsg->bsg_job;
if (bsg_job->request->msgcode
== FC_BSG_HST_CT)
kfree(sp->fcport);
sp_bsg->bsg_job->req->errors = 0;
sp_bsg->bsg_job->reply->result = res;
sp_bsg->bsg_job->job_done(sp_bsg->bsg_job);
bsg_job->req->errors = 0;
bsg_job->reply->result = res;
bsg_job->job_done(
sp_bsg->bsg_job);
kfree(sp->ctx);
mempool_free(sp, ha->srb_mempool);
mempool_free(sp,
ha->srb_mempool);
}
}
}