Skip to content

Commit

Permalink
[SCSI] qla2xxx: Cleanup DEBUG macro usage.
Browse files Browse the repository at this point in the history
- macro usage statements should terminate with a ';'
- remove unused macros.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jun 26, 2006
1 parent 7469059 commit 744f11f
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 166 deletions.
98 changes: 43 additions & 55 deletions drivers/scsi/qla2xxx/qla_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand 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);
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 744f11f

Please sign in to comment.