Commit 744f11fd authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Cleanup DEBUG macro usage.

- macro usage statements should terminate with a ';'
- remove unused macros.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7469059d
......@@ -37,122 +37,110 @@
/*
* Macros use for debugging the driver.
*/
#undef ENTER_TRACE
#if defined(ENTER_TRACE)
#define ENTER(x) do { printk("qla2100 : Entering %s()\n", x); } while (0)
#define LEAVE(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0)
#define ENTER_INTR(x) do { printk("qla2100 : Entering %s()\n", x); } while (0)
#define LEAVE_INTR(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0)
#else
#define ENTER(x) do {} while (0)
#define LEAVE(x) do {} while (0)
#define ENTER_INTR(x) do {} while (0)
#define LEAVE_INTR(x) do {} while (0)
#endif
#if DEBUG_QLA2100
#define DEBUG(x) do {x;} while (0);
#define DEBUG(x) do {x;} while (0)
#else
#define DEBUG(x) do {} while (0);
#define DEBUG(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_1)
#define DEBUG1(x) do {x;} while (0);
#define DEBUG1(x) do {x;} while (0)
#else
#define DEBUG1(x) do {} while (0);
#define DEBUG1(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_2)
#define DEBUG2(x) do {x;} while (0);
#define DEBUG2_3(x) do {x;} while (0);
#define DEBUG2_3_11(x) do {x;} while (0);
#define DEBUG2_9_10(x) do {x;} while (0);
#define DEBUG2_11(x) do {x;} while (0);
#define DEBUG2_13(x) do {x;} while (0);
#define DEBUG2(x) do {x;} while (0)
#define DEBUG2_3(x) do {x;} while (0)
#define DEBUG2_3_11(x) do {x;} while (0)
#define DEBUG2_9_10(x) do {x;} while (0)
#define DEBUG2_11(x) do {x;} while (0)
#define DEBUG2_13(x) do {x;} while (0)
#else
#define DEBUG2(x) do {} while (0);
#define DEBUG2(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_3)
#define DEBUG3(x) do {x;} while (0);
#define DEBUG2_3(x) do {x;} while (0);
#define DEBUG2_3_11(x) do {x;} while (0);
#define DEBUG3_11(x) do {x;} while (0);
#define DEBUG3(x) do {x;} while (0)
#define DEBUG2_3(x) do {x;} while (0)
#define DEBUG2_3_11(x) do {x;} while (0)
#define DEBUG3_11(x) do {x;} while (0)
#else
#define DEBUG3(x) do {} while (0);
#define DEBUG3(x) do {} while (0)
#if !defined(QL_DEBUG_LEVEL_2)
#define DEBUG2_3(x) do {} while (0);
#define DEBUG2_3(x) do {} while (0)
#endif
#endif
#if defined(QL_DEBUG_LEVEL_4)
#define DEBUG4(x) do {x;} while (0);
#define DEBUG4(x) do {x;} while (0)
#else
#define DEBUG4(x) do {} while (0);
#define DEBUG4(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_5)
#define DEBUG5(x) do {x;} while (0);
#define DEBUG5(x) do {x;} while (0)
#else
#define DEBUG5(x) do {} while (0);
#define DEBUG5(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_7)
#define DEBUG7(x) do {x;} while (0);
#define DEBUG7(x) do {x;} while (0)
#else
#define DEBUG7(x) do {} while (0);
#define DEBUG7(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_9)
#define DEBUG9(x) do {x;} while (0);
#define DEBUG9_10(x) do {x;} while (0);
#define DEBUG2_9_10(x) do {x;} while (0);
#define DEBUG9(x) do {x;} while (0)
#define DEBUG9_10(x) do {x;} while (0)
#define DEBUG2_9_10(x) do {x;} while (0)
#else
#define DEBUG9(x) do {} while (0);
#define DEBUG9(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_10)
#define DEBUG10(x) do {x;} while (0);
#define DEBUG2_9_10(x) do {x;} while (0);
#define DEBUG9_10(x) do {x;} while (0);
#define DEBUG10(x) do {x;} while (0)
#define DEBUG2_9_10(x) do {x;} while (0)
#define DEBUG9_10(x) do {x;} while (0)
#else
#define DEBUG10(x) do {} while (0);
#define DEBUG10(x) do {} while (0)
#if !defined(DEBUG2_9_10)
#define DEBUG2_9_10(x) do {} while (0);
#define DEBUG2_9_10(x) do {} while (0)
#endif
#if !defined(DEBUG9_10)
#define DEBUG9_10(x) do {} while (0);
#define DEBUG9_10(x) do {} while (0)
#endif
#endif
#if defined(QL_DEBUG_LEVEL_11)
#define DEBUG11(x) do{x;} while(0);
#define DEBUG11(x) do{x;} while(0)
#if !defined(DEBUG2_11)
#define DEBUG2_11(x) do{x;} while(0);
#define DEBUG2_11(x) do{x;} while(0)
#endif
#if !defined(DEBUG2_3_11)
#define DEBUG2_3_11(x) do{x;} while(0);
#define DEBUG2_3_11(x) do{x;} while(0)
#endif
#if !defined(DEBUG3_11)
#define DEBUG3_11(x) do{x;} while(0);
#define DEBUG3_11(x) do{x;} while(0)
#endif
#else
#define DEBUG11(x) do{} while(0);
#define DEBUG11(x) do{} while(0)
#if !defined(QL_DEBUG_LEVEL_2)
#define DEBUG2_11(x) do{} while(0);
#define DEBUG2_11(x) do{} while(0)
#if !defined(QL_DEBUG_LEVEL_3)
#define DEBUG2_3_11(x) do{} while(0);
#define DEBUG2_3_11(x) do{} while(0)
#endif
#endif
#if !defined(QL_DEBUG_LEVEL_3)
#define DEBUG3_11(x) do{} while(0);
#define DEBUG3_11(x) do{} while(0)
#endif
#endif
#if defined(QL_DEBUG_LEVEL_12)
#define DEBUG12(x) do {x;} while (0);
#define DEBUG12(x) do {x;} while (0)
#else
#define DEBUG12(x) do {} while (0);
#define DEBUG12(x) do {} while (0)
#endif
#if defined(QL_DEBUG_LEVEL_13)
......
......@@ -3137,14 +3137,14 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
ha->isp_abort_cnt--;
DEBUG(printk("qla%ld: ISP abort - "
"retry remaining %d\n",
ha->host_no, ha->isp_abort_cnt);)
ha->host_no, ha->isp_abort_cnt));
status = 1;
}
} else {
ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT;
DEBUG(printk("qla2x00(%ld): ISP error recovery "
"- retrying (%d) more times\n",
ha->host_no, ha->isp_abort_cnt);)
ha->host_no, ha->isp_abort_cnt));
set_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
status = 1;
}
......@@ -3158,7 +3158,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
} else {
DEBUG(printk(KERN_INFO
"qla2x00_abort_isp(%ld): exiting.\n",
ha->host_no);)
ha->host_no));
}
return(status);
......@@ -3234,7 +3234,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
if (!(status = qla2x00_fw_ready(ha))) {
DEBUG(printk("%s(): Start configure loop, "
"status = %d\n", __func__, status);)
"status = %d\n", __func__, status));
/* Issue a marker after FW becomes ready. */
qla2x00_marker(ha, 0, 0, MK_SYNC_ALL);
......@@ -3258,7 +3258,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
DEBUG(printk("%s(): Configure loop done, status = 0x%x\n",
__func__,
status);)
status));
}
return (status);
}
......
......@@ -1432,8 +1432,8 @@ qla24xx_ms_entry(scsi_qla_host_t *ha, struct ct_entry_24xx *pkt)
DEBUG3(printk("%s(%ld): pkt=%p pkthandle=%d.\n",
__func__, ha->host_no, pkt, pkt->handle));
DEBUG9(printk("%s: ct pkt dump:\n", __func__);)
DEBUG9(qla2x00_dump_buffer((void *)pkt, sizeof(struct ct_entry_24xx));)
DEBUG9(printk("%s: ct pkt dump:\n", __func__));
DEBUG9(qla2x00_dump_buffer((void *)pkt, sizeof(struct ct_entry_24xx)));
/* Validate handle. */
if (pkt->handle < MAX_OUTSTANDING_COMMANDS)
......
This diff is collapsed.
......@@ -631,7 +631,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n",
__func__, ha->host_no, sp, serial));
DEBUG3(qla2x00_print_scsi_cmd(cmd);)
DEBUG3(qla2x00_print_scsi_cmd(cmd));
spin_unlock_irqrestore(&ha->hardware_lock, flags);
if (ha->isp_ops.abort_command(ha, sp)) {
......@@ -773,7 +773,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
#endif
} else {
DEBUG2(printk(KERN_INFO
"%s failed: loop not ready\n",__func__);)
"%s failed: loop not ready\n",__func__));
}
if (ret == FAILED) {
......@@ -1028,12 +1028,12 @@ qla2x00_loop_reset(scsi_qla_host_t *ha)
/* Empty */
DEBUG2_3(printk("%s(%ld): **** FAILED ****\n",
__func__,
ha->host_no);)
ha->host_no));
} else {
/* Empty */
DEBUG3(printk("%s(%ld): exiting normally.\n",
__func__,
ha->host_no);)
ha->host_no));
}
return(status);
......
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