Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] libsas: convert to standard kernel debugging

Instead of using a config option for debugging, just dump the
messages with KERN_DEBUG.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>

+1 -33
-8
drivers/scsi/libsas/Kconfig
··· 46 46 Allows sas hosts to receive SMP frames. Selecting this 47 47 option builds an SMP interpreter into libsas. Say 48 48 N here if you want to save the few kb this consumes. 49 - 50 - config SCSI_SAS_LIBSAS_DEBUG 51 - bool "Compile the SAS Domain Transport Attributes in debug mode" 52 - default y 53 - depends on SCSI_SAS_LIBSAS 54 - help 55 - Compiles the SAS Layer in debug mode. In debug mode, the 56 - SAS Layer prints diagnostic and debug messages.
-4
drivers/scsi/libsas/Makefile
··· 21 21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 22 # USA 23 23 24 - ifeq ($(CONFIG_SCSI_SAS_LIBSAS_DEBUG),y) 25 - EXTRA_CFLAGS += -DSAS_DEBUG 26 - endif 27 - 28 24 obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o 29 25 libsas-y += sas_init.o \ 30 26 sas_phy.o \
-4
drivers/scsi/libsas/sas_dump.c
··· 24 24 25 25 #include "sas_dump.h" 26 26 27 - #ifdef SAS_DEBUG 28 - 29 27 static const char *sas_hae_str[] = { 30 28 [0] = "HAE_RESET", 31 29 }; ··· 70 72 SAS_DPRINTK("port%d: oob_mode:0x%x\n", port->id, port->oob_mode); 71 73 SAS_DPRINTK("port%d: num_phys:%d\n", port->id, port->num_phys); 72 74 } 73 - 74 - #endif /* SAS_DEBUG */
-12
drivers/scsi/libsas/sas_dump.h
··· 24 24 25 25 #include "sas_internal.h" 26 26 27 - #ifdef SAS_DEBUG 28 - 29 27 void sas_dprint_porte(int phyid, enum port_event pe); 30 28 void sas_dprint_phye(int phyid, enum phy_event pe); 31 29 void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he); 32 30 void sas_dump_port(struct asd_sas_port *port); 33 - 34 - #else /* SAS_DEBUG */ 35 - 36 - static inline void sas_dprint_porte(int phyid, enum port_event pe) { } 37 - static inline void sas_dprint_phye(int phyid, enum phy_event pe) { } 38 - static inline void sas_dprint_hae(struct sas_ha_struct *sas_ha, 39 - enum ha_event he) { } 40 - static inline void sas_dump_port(struct asd_sas_port *port) { } 41 - 42 - #endif /* SAS_DEBUG */
+1 -5
drivers/scsi/libsas/sas_internal.h
··· 33 33 34 34 #define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) 35 35 36 - #ifdef SAS_DEBUG 37 - #define SAS_DPRINTK(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) 38 - #else 39 - #define SAS_DPRINTK(fmt, ...) 40 - #endif 36 + #define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__) 41 37 42 38 #define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble) 43 39 #define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0)