Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8424f68 authored by Joe Perches's avatar Joe Perches Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Make the logging functions verify their arguments and fixed...


[SCSI] qla2xxx: Make the logging functions verify their arguments and fixed the current broken uses as appropriate.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 086b3e8a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ qla2x00_sysfs_write_edc(struct file *filp, struct kobject *kobj,
	    dev, adr, len, opt);
	if (rval != QLA_SUCCESS) {
		ql_log(ql_log_warn, vha, 0x7074,
		    "Unable to write EDC (%x) %02x:%04x:%02x:%02hhx\n",
		    "Unable to write EDC (%x) %02x:%04x:%02x:%02x:%02hhx\n",
		    rval, dev, adr, opt, len, buf[8]);
		return -EIO;
	}
@@ -724,7 +724,7 @@ qla2x00_sysfs_write_edc_status(struct file *filp, struct kobject *kobj,
			dev, adr, len, opt);
	if (rval != QLA_SUCCESS) {
		ql_log(ql_log_info, vha, 0x7075,
		    "Unable to write EDC status (%x) %02x:%04x:%02x.\n",
		    "Unable to write EDC status (%x) %02x:%04x:%02x:%02x.\n",
		    rval, dev, adr, opt, len);
		return -EIO;
	}
+4 −4
Original line number Diff line number Diff line
@@ -244,14 +244,14 @@ struct qla2xxx_fw_dump {

extern int ql_errlev;

void
void __attribute__((format (printf, 4, 5)))
ql_dbg(uint32_t, scsi_qla_host_t *vha, int32_t, const char *fmt, ...);
void
void __attribute__((format (printf, 4, 5)))
ql_dbg_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...);

void
void __attribute__((format (printf, 4, 5)))
ql_log(uint32_t, scsi_qla_host_t *vha, int32_t, const char *fmt, ...);
void
void __attribute__((format (printf, 4, 5)))
ql_log_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...);

/* Debug Levels */
+2 −1
Original line number Diff line number Diff line
@@ -4188,7 +4188,8 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
		spin_unlock_irqrestore(&ha->vport_slock, flags);

	} else {
		ql_log(ql_log_warn, vha, 0x8023, "%s **** FAILED ****.\n");
		ql_log(ql_log_warn, vha, 0x8023, "%s **** FAILED ****.\n",
		       __func__);
	}

	return(status);
+1 −1
Original line number Diff line number Diff line
@@ -1004,7 +1004,7 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
		sle_dma = sg_dma_address(sg);
		ql_dbg(ql_dbg_io, vha, 0x300a,
		    "sg entry %d - addr=0x%x 0x%x, " "len=%d for cmd=%p.\n",
		    cur_dsd, i, LSD(sle_dma), MSD(sle_dma), sg_dma_len(sg),
		    i, LSD(sle_dma), MSD(sle_dma), sg_dma_len(sg),
		    sp->cmd);
		*cur_dsd++ = cpu_to_le32(LSD(sle_dma));
		*cur_dsd++ = cpu_to_le32(MSD(sle_dma));
+1 −1
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr)
		return;

	ql_dbg(ql_dbg_async, vha, 0x5022,
	    "Inter-Driver Commucation %s -- ACK timeout=%d.\n",
	    "%lu Inter-Driver Communication %s -- ACK timeout=%d.\n",
	    vha->host_no, event[aen & 0xff], timeout);

	rval = qla2x00_post_idc_ack_work(vha, mb);
Loading