Re: [PATCH v2 10/12] scsi/NCR5380: remove unused macro definitions
Acked-by: MIchael Schmitz schm...@debian.org Remove the unused (and divergent) debugging macro definitions from the sun3_NCR5380 and atari_NCR5380 drivers. These drivers have been converted to use the common macros in NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_scsi.h | 93 --- drivers/scsi/sun3_scsi.h | 181 -- 2 files changed, 274 deletions(-) Index: linux-m68k/drivers/scsi/atari_scsi.h === --- linux-m68k.orig/drivers/scsi/atari_scsi.h 2014-03-19 23:23:02.0 +1100 +++ linux-m68k/drivers/scsi/atari_scsi.h2014-03-19 23:34:45.0 +1100 @@ -80,99 +80,6 @@ #define SCSI_RESET_HOST_RESET 0x200 #define SCSI_RESET_ACTION 0xff -/* Debugging printk definitions: - * - * ARB - arbitration - * ASEN - auto-sense - * DMA - DMA - * HSH - PIO handshake - * INF - information transfer - * INI - initialization - * INT - interrupt - * LNK - linked commands - * MAIN - NCR5380_main() control flow - * NDAT - no data-out phase - * NWR - no write commands - * PIO - PIO transfers - * PDMA - pseudo DMA (unused on Atari) - * QU - queues - * RSL - reselections - * SEL - selections - * USL - usleep cpde (unused on Atari) - * LBS - last byte sent (unused on Atari) - * RSS - restarting of selections - * EXT - extended messages - * ABRT - aborting and resetting - * TAG - queue tag handling - * MER - merging of consec. buffers - * - */ - -#define dprint(flg, format...) \ -({ \ - if (NDEBUG (flg)) \ - printk(KERN_DEBUG format); \ -}) - -#define ARB_PRINTK(format, args...) \ - dprint(NDEBUG_ARBITRATION, format , ## args) -#define ASEN_PRINTK(format, args...) \ - dprint(NDEBUG_AUTOSENSE, format , ## args) -#define DMA_PRINTK(format, args...) \ - dprint(NDEBUG_DMA, format , ## args) -#define HSH_PRINTK(format, args...) \ - dprint(NDEBUG_HANDSHAKE, format , ## args) -#define INF_PRINTK(format, args...) \ - dprint(NDEBUG_INFORMATION, format , ## args) -#define INI_PRINTK(format, args...) \ - dprint(NDEBUG_INIT, format , ## args) -#define INT_PRINTK(format, args...) \ - dprint(NDEBUG_INTR, format , ## args) -#define LNK_PRINTK(format, args...) \ - dprint(NDEBUG_LINKED, format , ## args) -#define MAIN_PRINTK(format, args...) \ - dprint(NDEBUG_MAIN, format , ## args) -#define NDAT_PRINTK(format, args...) \ - dprint(NDEBUG_NO_DATAOUT, format , ## args) -#define NWR_PRINTK(format, args...) \ - dprint(NDEBUG_NO_WRITE, format , ## args) -#define PIO_PRINTK(format, args...) \ - dprint(NDEBUG_PIO, format , ## args) -#define PDMA_PRINTK(format, args...) \ - dprint(NDEBUG_PSEUDO_DMA, format , ## args) -#define QU_PRINTK(format, args...) \ - dprint(NDEBUG_QUEUES, format , ## args) -#define RSL_PRINTK(format, args...) \ - dprint(NDEBUG_RESELECTION, format , ## args) -#define SEL_PRINTK(format, args...) \ - dprint(NDEBUG_SELECTION, format , ## args) -#define USL_PRINTK(format, args...) \ - dprint(NDEBUG_USLEEP, format , ## args) -#define LBS_PRINTK(format, args...) \ - dprint(NDEBUG_LAST_BYTE_SENT, format , ## args) -#define RSS_PRINTK(format, args...) \ - dprint(NDEBUG_RESTART_SELECT, format , ## args) -#define EXT_PRINTK(format, args...) \ - dprint(NDEBUG_EXTENDED, format , ## args) -#define ABRT_PRINTK(format, args...) \ - dprint(NDEBUG_ABORT, format , ## args) -#define TAG_PRINTK(format, args...) \ - dprint(NDEBUG_TAGS, format , ## args) -#define MER_PRINTK(format, args...) \ - dprint(NDEBUG_MERGING, format , ## args) - -/* conditional macros for NCR5380_print_{,phase,status} */ - -#define NCR_PRINT(mask)\ - ((NDEBUG (mask)) ? NCR5380_print(instance) : (void)0) - -#define NCR_PRINT_PHASE(mask) \ - ((NDEBUG (mask)) ? NCR5380_print_phase(instance) : (void)0) - -#define NCR_PRINT_STATUS(mask) \ - ((NDEBUG (mask)) ? NCR5380_print_status(instance) : (void)0) - - #endif /* ndef ASM */ #endif /* ATARI_SCSI_H */ Index: linux-m68k/drivers/scsi/sun3_scsi.h === --- linux-m68k.orig/drivers/scsi/sun3_scsi.h2014-03-19 23:34:41.0 +1100 +++ linux-m68k/drivers/scsi/sun3_scsi.h 2014-03-19 23:34:45.0 +1100 @@ -182,188 +182,7 @@ struct sun3_udc_regs { #define VME_DATA24 0x3d00 -// debugging printk's, taken from atari_scsi.h -/* Debugging printk definitions: - * - * ARB - arbitration - * ASEN - auto-sense - * DMA - DMA - * HSH - PIO handshake - * INF - information transfer - * INI - initialization - * INT - interrupt - * LNK - linked commands - * MAIN - NCR5380_main() control flow - * NDAT - no data-out phase - * NWR - no write
[PATCH v2 10/12] scsi/NCR5380: remove unused macro definitions
Remove the unused (and divergent) debugging macro definitions from the sun3_NCR5380 and atari_NCR5380 drivers. These drivers have been converted to use the common macros in NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_scsi.h | 93 --- drivers/scsi/sun3_scsi.h | 181 -- 2 files changed, 274 deletions(-) Index: linux-m68k/drivers/scsi/atari_scsi.h === --- linux-m68k.orig/drivers/scsi/atari_scsi.h 2014-03-19 23:23:02.0 +1100 +++ linux-m68k/drivers/scsi/atari_scsi.h2014-03-19 23:34:45.0 +1100 @@ -80,99 +80,6 @@ #define SCSI_RESET_HOST_RESET 0x200 #define SCSI_RESET_ACTION 0xff -/* Debugging printk definitions: - * - * ARB - arbitration - * ASEN - auto-sense - * DMA - DMA - * HSH - PIO handshake - * INF - information transfer - * INI - initialization - * INT - interrupt - * LNK - linked commands - * MAIN - NCR5380_main() control flow - * NDAT - no data-out phase - * NWR - no write commands - * PIO - PIO transfers - * PDMA - pseudo DMA (unused on Atari) - * QU - queues - * RSL - reselections - * SEL - selections - * USL - usleep cpde (unused on Atari) - * LBS - last byte sent (unused on Atari) - * RSS - restarting of selections - * EXT - extended messages - * ABRT - aborting and resetting - * TAG - queue tag handling - * MER - merging of consec. buffers - * - */ - -#define dprint(flg, format...) \ -({ \ - if (NDEBUG (flg)) \ - printk(KERN_DEBUG format); \ -}) - -#define ARB_PRINTK(format, args...) \ - dprint(NDEBUG_ARBITRATION, format , ## args) -#define ASEN_PRINTK(format, args...) \ - dprint(NDEBUG_AUTOSENSE, format , ## args) -#define DMA_PRINTK(format, args...) \ - dprint(NDEBUG_DMA, format , ## args) -#define HSH_PRINTK(format, args...) \ - dprint(NDEBUG_HANDSHAKE, format , ## args) -#define INF_PRINTK(format, args...) \ - dprint(NDEBUG_INFORMATION, format , ## args) -#define INI_PRINTK(format, args...) \ - dprint(NDEBUG_INIT, format , ## args) -#define INT_PRINTK(format, args...) \ - dprint(NDEBUG_INTR, format , ## args) -#define LNK_PRINTK(format, args...) \ - dprint(NDEBUG_LINKED, format , ## args) -#define MAIN_PRINTK(format, args...) \ - dprint(NDEBUG_MAIN, format , ## args) -#define NDAT_PRINTK(format, args...) \ - dprint(NDEBUG_NO_DATAOUT, format , ## args) -#define NWR_PRINTK(format, args...) \ - dprint(NDEBUG_NO_WRITE, format , ## args) -#define PIO_PRINTK(format, args...) \ - dprint(NDEBUG_PIO, format , ## args) -#define PDMA_PRINTK(format, args...) \ - dprint(NDEBUG_PSEUDO_DMA, format , ## args) -#define QU_PRINTK(format, args...) \ - dprint(NDEBUG_QUEUES, format , ## args) -#define RSL_PRINTK(format, args...) \ - dprint(NDEBUG_RESELECTION, format , ## args) -#define SEL_PRINTK(format, args...) \ - dprint(NDEBUG_SELECTION, format , ## args) -#define USL_PRINTK(format, args...) \ - dprint(NDEBUG_USLEEP, format , ## args) -#define LBS_PRINTK(format, args...) \ - dprint(NDEBUG_LAST_BYTE_SENT, format , ## args) -#define RSS_PRINTK(format, args...) \ - dprint(NDEBUG_RESTART_SELECT, format , ## args) -#define EXT_PRINTK(format, args...) \ - dprint(NDEBUG_EXTENDED, format , ## args) -#define ABRT_PRINTK(format, args...) \ - dprint(NDEBUG_ABORT, format , ## args) -#define TAG_PRINTK(format, args...) \ - dprint(NDEBUG_TAGS, format , ## args) -#define MER_PRINTK(format, args...) \ - dprint(NDEBUG_MERGING, format , ## args) - -/* conditional macros for NCR5380_print_{,phase,status} */ - -#define NCR_PRINT(mask)\ - ((NDEBUG (mask)) ? NCR5380_print(instance) : (void)0) - -#define NCR_PRINT_PHASE(mask) \ - ((NDEBUG (mask)) ? NCR5380_print_phase(instance) : (void)0) - -#define NCR_PRINT_STATUS(mask) \ - ((NDEBUG (mask)) ? NCR5380_print_status(instance) : (void)0) - - #endif /* ndef ASM */ #endif /* ATARI_SCSI_H */ Index: linux-m68k/drivers/scsi/sun3_scsi.h === --- linux-m68k.orig/drivers/scsi/sun3_scsi.h2014-03-19 23:34:41.0 +1100 +++ linux-m68k/drivers/scsi/sun3_scsi.h 2014-03-19 23:34:45.0 +1100 @@ -182,188 +182,7 @@ struct sun3_udc_regs { #define VME_DATA24 0x3d00 -// debugging printk's, taken from atari_scsi.h -/* Debugging printk definitions: - * - * ARB - arbitration - * ASEN - auto-sense - * DMA - DMA - * HSH - PIO handshake - * INF - information transfer - * INI - initialization - * INT - interrupt - * LNK - linked commands - * MAIN - NCR5380_main() control flow - * NDAT - no data-out phase - * NWR - no write commands - * PIO - PIO transfers - * PDMA - pseudo DMA (unused