Skip to content

Commit

Permalink
[SCSI] libsas: convert to standard kernel debugging
Browse files Browse the repository at this point in the history
Instead of using a config option for debugging, just dump the
messages with KERN_DEBUG.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jan 24, 2011
1 parent 75c0b38 commit 96db6fa
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 33 deletions.
8 changes: 0 additions & 8 deletions drivers/scsi/libsas/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,3 @@ config SCSI_SAS_HOST_SMP
Allows sas hosts to receive SMP frames. Selecting this
option builds an SMP interpreter into libsas. Say
N here if you want to save the few kb this consumes.

config SCSI_SAS_LIBSAS_DEBUG
bool "Compile the SAS Domain Transport Attributes in debug mode"
default y
depends on SCSI_SAS_LIBSAS
help
Compiles the SAS Layer in debug mode. In debug mode, the
SAS Layer prints diagnostic and debug messages.
4 changes: 0 additions & 4 deletions drivers/scsi/libsas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA

ifeq ($(CONFIG_SCSI_SAS_LIBSAS_DEBUG),y)
EXTRA_CFLAGS += -DSAS_DEBUG
endif

obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o
libsas-y += sas_init.o \
sas_phy.o \
Expand Down
4 changes: 0 additions & 4 deletions drivers/scsi/libsas/sas_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#include "sas_dump.h"

#ifdef SAS_DEBUG

static const char *sas_hae_str[] = {
[0] = "HAE_RESET",
};
Expand Down Expand Up @@ -72,5 +70,3 @@ void sas_dump_port(struct asd_sas_port *port)
SAS_DPRINTK("port%d: oob_mode:0x%x\n", port->id, port->oob_mode);
SAS_DPRINTK("port%d: num_phys:%d\n", port->id, port->num_phys);
}

#endif /* SAS_DEBUG */
12 changes: 0 additions & 12 deletions drivers/scsi/libsas/sas_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,7 @@

#include "sas_internal.h"

#ifdef SAS_DEBUG

void sas_dprint_porte(int phyid, enum port_event pe);
void sas_dprint_phye(int phyid, enum phy_event pe);
void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he);
void sas_dump_port(struct asd_sas_port *port);

#else /* SAS_DEBUG */

static inline void sas_dprint_porte(int phyid, enum port_event pe) { }
static inline void sas_dprint_phye(int phyid, enum phy_event pe) { }
static inline void sas_dprint_hae(struct sas_ha_struct *sas_ha,
enum ha_event he) { }
static inline void sas_dump_port(struct asd_sas_port *port) { }

#endif /* SAS_DEBUG */
6 changes: 1 addition & 5 deletions drivers/scsi/libsas/sas_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@

#define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__)

#ifdef SAS_DEBUG
#define SAS_DPRINTK(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__)
#else
#define SAS_DPRINTK(fmt, ...)
#endif
#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__)

#define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble)
#define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0)
Expand Down

0 comments on commit 96db6fa

Please sign in to comment.