From d3c74871bdcb9cb09dca22994dfee8500515f28f Mon Sep 17 00:00:00 2001 From: "brking@us.ibm.com" Date: Tue, 1 Nov 2005 17:01:34 -0600 Subject: [SCSI] ipr: Runtime debugging options Make some compile time debugging options runtime module options. Signed-off-by: Brian King Signed-off-by: James Bottomley --- drivers/scsi/ipr.h | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'drivers/scsi/ipr.h') diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 1a29eb865b0..414aa07e20f 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -39,21 +39,6 @@ #define IPR_DRIVER_VERSION "2.0.14" #define IPR_DRIVER_DATE "(May 2, 2005)" -/* - * IPR_DBG_TRACE: Setting this to 1 will turn on some general function tracing - * resulting in a bunch of extra debugging printks to the console - * - * IPR_DEBUG: Setting this to 1 will turn on some error path tracing. - * Enables the ipr_trace macro. - */ -#ifdef IPR_DEBUG_ALL -#define IPR_DEBUG 1 -#define IPR_DBG_TRACE 1 -#else -#define IPR_DEBUG 0 -#define IPR_DBG_TRACE 0 -#endif - /* * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding * ops per device for devices not running tagged command queuing. @@ -1090,11 +1075,7 @@ struct ipr_ucode_image_header { /* * Macros */ -#if IPR_DEBUG -#define IPR_DBG_CMD(CMD) do { CMD; } while (0) -#else -#define IPR_DBG_CMD(CMD) -#endif +#define IPR_DBG_CMD(CMD) if (ipr_debug) { CMD; } #ifdef CONFIG_SCSI_IPR_TRACE #define ipr_create_trace_file(kobj, attr) sysfs_create_bin_file(kobj, attr) @@ -1156,13 +1137,8 @@ struct ipr_ucode_image_header { #define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\ __FILE__, __FUNCTION__, __LINE__) -#if IPR_DBG_TRACE -#define ENTER printk(KERN_INFO IPR_NAME": Entering %s\n", __FUNCTION__) -#define LEAVE printk(KERN_INFO IPR_NAME": Leaving %s\n", __FUNCTION__) -#else -#define ENTER -#define LEAVE -#endif +#define ENTER IPR_DBG_CMD(printk(KERN_INFO IPR_NAME": Entering %s\n", __FUNCTION__)) +#define LEAVE IPR_DBG_CMD(printk(KERN_INFO IPR_NAME": Leaving %s\n", __FUNCTION__)) #define ipr_err_separator \ ipr_err("----------------------------------------------------------\n") -- cgit v1.2.3