diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-01-03 00:05:04 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-01-06 21:42:51 -0500 |
commit | 2f7dba9f7d8f8ece8f224bf26e9b2a06da2ed15c (patch) | |
tree | b8cba2d18d5c4b47cdcd29b23f77304d9fd868ca | |
parent | d5f7e65df0d41982b1e9cbba9df04003ebb2178d (diff) |
ncr5380: Eliminate PDEBUG*, TDEBUG* and DTCDEBUG* macros
Replace {P,T,DTC}DEBUG_INIT with NDEBUG_INIT. Remove dead debugging
code, including code that's conditional upon *DEBUG_TRANSFER.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/dtc.c | 18 | ||||
-rw-r--r-- | drivers/scsi/dtc.h | 27 | ||||
-rw-r--r-- | drivers/scsi/pas16.c | 21 | ||||
-rw-r--r-- | drivers/scsi/pas16.h | 16 | ||||
-rw-r--r-- | drivers/scsi/t128.c | 18 | ||||
-rw-r--r-- | drivers/scsi/t128.h | 16 |
6 files changed, 19 insertions, 97 deletions
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 99164d60df13..38325f979b90 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c | |||
@@ -205,9 +205,8 @@ static int __init dtc_detect(struct scsi_host_template * tpnt) | |||
205 | addr = 0; | 205 | addr = 0; |
206 | } else | 206 | } else |
207 | for (; !addr && (current_base < NO_BASES); ++current_base) { | 207 | for (; !addr && (current_base < NO_BASES); ++current_base) { |
208 | #if (DTCDEBUG & DTCDEBUG_INIT) | 208 | dprintk(NDEBUG_INIT, "dtc: probing address 0x%08x\n", |
209 | printk(KERN_DEBUG "scsi-dtc : probing address %08x\n", bases[current_base].address); | 209 | (unsigned int)bases[current_base].address); |
210 | #endif | ||
211 | if (bases[current_base].noauto) | 210 | if (bases[current_base].noauto) |
212 | continue; | 211 | continue; |
213 | base = ioremap(bases[current_base].address, 0x2000); | 212 | base = ioremap(bases[current_base].address, 0x2000); |
@@ -216,18 +215,14 @@ static int __init dtc_detect(struct scsi_host_template * tpnt) | |||
216 | for (sig = 0; sig < NO_SIGNATURES; ++sig) { | 215 | for (sig = 0; sig < NO_SIGNATURES; ++sig) { |
217 | if (check_signature(base + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) { | 216 | if (check_signature(base + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) { |
218 | addr = bases[current_base].address; | 217 | addr = bases[current_base].address; |
219 | #if (DTCDEBUG & DTCDEBUG_INIT) | 218 | dprintk(NDEBUG_INIT, "dtc: detected board\n"); |
220 | printk(KERN_DEBUG "scsi-dtc : detected board.\n"); | ||
221 | #endif | ||
222 | goto found; | 219 | goto found; |
223 | } | 220 | } |
224 | } | 221 | } |
225 | iounmap(base); | 222 | iounmap(base); |
226 | } | 223 | } |
227 | 224 | ||
228 | #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT) | 225 | dprintk(NDEBUG_INIT, "dtc: addr = 0x%08x\n", addr); |
229 | printk(KERN_DEBUG "scsi-dtc : base = %08x\n", addr); | ||
230 | #endif | ||
231 | 226 | ||
232 | if (!addr) | 227 | if (!addr) |
233 | break; | 228 | break; |
@@ -271,9 +266,8 @@ found: | |||
271 | printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no); | 266 | printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no); |
272 | instance->irq = NO_IRQ; | 267 | instance->irq = NO_IRQ; |
273 | #endif | 268 | #endif |
274 | #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT) | 269 | dprintk(NDEBUG_INIT, "scsi%d : irq = %d\n", |
275 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 270 | instance->host_no, instance->irq); |
276 | #endif | ||
277 | 271 | ||
278 | ++current_override; | 272 | ++current_override; |
279 | ++count; | 273 | ++count; |
diff --git a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h index 78a2332e9064..46483b280046 100644 --- a/drivers/scsi/dtc.h +++ b/drivers/scsi/dtc.h | |||
@@ -10,10 +10,6 @@ | |||
10 | #ifndef DTC3280_H | 10 | #ifndef DTC3280_H |
11 | #define DTC3280_H | 11 | #define DTC3280_H |
12 | 12 | ||
13 | #define DTCDEBUG 0 | ||
14 | #define DTCDEBUG_INIT 0x1 | ||
15 | #define DTCDEBUG_TRANSFER 0x2 | ||
16 | |||
17 | #ifndef CMD_PER_LUN | 13 | #ifndef CMD_PER_LUN |
18 | #define CMD_PER_LUN 2 | 14 | #define CMD_PER_LUN 2 |
19 | #endif | 15 | #endif |
@@ -33,31 +29,8 @@ | |||
33 | 29 | ||
34 | #define DTC_address(reg) (base + DTC_5380_OFFSET + reg) | 30 | #define DTC_address(reg) (base + DTC_5380_OFFSET + reg) |
35 | 31 | ||
36 | #define dbNCR5380_read(reg) \ | ||
37 | (rval=readb(DTC_address(reg)), \ | ||
38 | (((unsigned char) printk("DTC : read register %d at addr %p is: %02x\n"\ | ||
39 | , (reg), DTC_address(reg), rval)), rval ) ) | ||
40 | |||
41 | #define dbNCR5380_write(reg, value) do { \ | ||
42 | printk("DTC : write %02x to register %d at address %p\n", \ | ||
43 | (value), (reg), DTC_address(reg)); \ | ||
44 | writeb(value, DTC_address(reg));} while(0) | ||
45 | |||
46 | |||
47 | #if !(DTCDEBUG & DTCDEBUG_TRANSFER) | ||
48 | #define NCR5380_read(reg) (readb(DTC_address(reg))) | 32 | #define NCR5380_read(reg) (readb(DTC_address(reg))) |
49 | #define NCR5380_write(reg, value) (writeb(value, DTC_address(reg))) | 33 | #define NCR5380_write(reg, value) (writeb(value, DTC_address(reg))) |
50 | #else | ||
51 | #define NCR5380_read(reg) (readb(DTC_address(reg))) | ||
52 | #define xNCR5380_read(reg) \ | ||
53 | (((unsigned char) printk("DTC : read register %d at address %p\n"\ | ||
54 | , (reg), DTC_address(reg))), readb(DTC_address(reg))) | ||
55 | |||
56 | #define NCR5380_write(reg, value) do { \ | ||
57 | printk("DTC : write %02x to register %d at address %p\n", \ | ||
58 | (value), (reg), DTC_address(reg)); \ | ||
59 | writeb(value, DTC_address(reg));} while(0) | ||
60 | #endif | ||
61 | 34 | ||
62 | #define NCR5380_intr dtc_intr | 35 | #define NCR5380_intr dtc_intr |
63 | #define NCR5380_queue_command dtc_queue_command | 36 | #define NCR5380_queue_command dtc_queue_command |
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 1549bc97777e..62bf1b43b646 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #define PSEUDO_DMA | 1 | #define PSEUDO_DMA |
2 | #define UNSAFE /* Not unsafe for PAS16 -- use it */ | 2 | #define UNSAFE /* Not unsafe for PAS16 -- use it */ |
3 | #define PDEBUG 0 | ||
4 | 3 | ||
5 | /* | 4 | /* |
6 | * This driver adapted from Drew Eckhardt's Trantor T128 driver | 5 | * This driver adapted from Drew Eckhardt's Trantor T128 driver |
@@ -377,23 +376,18 @@ static int __init pas16_detect(struct scsi_host_template *tpnt) | |||
377 | } | 376 | } |
378 | else | 377 | else |
379 | for (; !io_port && (current_base < NO_BASES); ++current_base) { | 378 | for (; !io_port && (current_base < NO_BASES); ++current_base) { |
380 | #if (PDEBUG & PDEBUG_INIT) | 379 | dprintk(NDEBUG_INIT, "pas16: probing io_port 0x%04x\n", |
381 | printk("scsi-pas16 : probing io_port %04x\n", (unsigned int) bases[current_base].io_port); | 380 | (unsigned int)bases[current_base].io_port); |
382 | #endif | ||
383 | if ( !bases[current_base].noauto && | 381 | if ( !bases[current_base].noauto && |
384 | pas16_hw_detect( current_base ) ){ | 382 | pas16_hw_detect( current_base ) ){ |
385 | io_port = bases[current_base].io_port; | 383 | io_port = bases[current_base].io_port; |
386 | init_board( io_port, default_irqs[ current_base ], 0 ); | 384 | init_board( io_port, default_irqs[ current_base ], 0 ); |
387 | #if (PDEBUG & PDEBUG_INIT) | 385 | dprintk(NDEBUG_INIT, "pas16: detected board\n"); |
388 | printk("scsi-pas16 : detected board.\n"); | ||
389 | #endif | ||
390 | } | 386 | } |
391 | } | 387 | } |
392 | 388 | ||
393 | 389 | dprintk(NDEBUG_INIT, "pas16: io_port = 0x%04x\n", | |
394 | #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT) | 390 | (unsigned int)io_port); |
395 | printk("scsi-pas16 : io_port = %04x\n", (unsigned int) io_port); | ||
396 | #endif | ||
397 | 391 | ||
398 | if (!io_port) | 392 | if (!io_port) |
399 | break; | 393 | break; |
@@ -431,9 +425,8 @@ static int __init pas16_detect(struct scsi_host_template *tpnt) | |||
431 | outb( (inb(io_port + IO_CONFIG_3) & 0x0f), io_port + IO_CONFIG_3 ); | 425 | outb( (inb(io_port + IO_CONFIG_3) & 0x0f), io_port + IO_CONFIG_3 ); |
432 | } | 426 | } |
433 | 427 | ||
434 | #if defined(PDEBUG) && (PDEBUG & PDEBUG_INIT) | 428 | dprintk(NDEBUG_INIT, "scsi%d : irq = %d\n", |
435 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 429 | instance->host_no, instance->irq); |
436 | #endif | ||
437 | 430 | ||
438 | ++current_override; | 431 | ++current_override; |
439 | ++count; | 432 | ++count; |
diff --git a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h index c6109c80050b..1fc7c049d0a1 100644 --- a/drivers/scsi/pas16.h +++ b/drivers/scsi/pas16.h | |||
@@ -24,9 +24,6 @@ | |||
24 | #ifndef PAS16_H | 24 | #ifndef PAS16_H |
25 | #define PAS16_H | 25 | #define PAS16_H |
26 | 26 | ||
27 | #define PDEBUG_INIT 0x1 | ||
28 | #define PDEBUG_TRANSFER 0x2 | ||
29 | |||
30 | #define PAS16_DEFAULT_BASE_1 0x388 | 27 | #define PAS16_DEFAULT_BASE_1 0x388 |
31 | #define PAS16_DEFAULT_BASE_2 0x384 | 28 | #define PAS16_DEFAULT_BASE_2 0x384 |
32 | #define PAS16_DEFAULT_BASE_3 0x38c | 29 | #define PAS16_DEFAULT_BASE_3 0x38c |
@@ -120,21 +117,8 @@ | |||
120 | 117 | ||
121 | #define PAS16_io_port(reg) ( io_port + pas16_offset[(reg)] ) | 118 | #define PAS16_io_port(reg) ( io_port + pas16_offset[(reg)] ) |
122 | 119 | ||
123 | #if !(PDEBUG & PDEBUG_TRANSFER) | ||
124 | #define NCR5380_read(reg) ( inb(PAS16_io_port(reg)) ) | 120 | #define NCR5380_read(reg) ( inb(PAS16_io_port(reg)) ) |
125 | #define NCR5380_write(reg, value) ( outb((value),PAS16_io_port(reg)) ) | 121 | #define NCR5380_write(reg, value) ( outb((value),PAS16_io_port(reg)) ) |
126 | #else | ||
127 | #define NCR5380_read(reg) \ | ||
128 | (((unsigned char) printk("scsi%d : read register %d at io_port %04x\n"\ | ||
129 | , instance->hostno, (reg), PAS16_io_port(reg))), inb( PAS16_io_port(reg)) ) | ||
130 | |||
131 | #define NCR5380_write(reg, value) \ | ||
132 | (printk("scsi%d : write %02x to register %d at io_port %04x\n", \ | ||
133 | instance->hostno, (value), (reg), PAS16_io_port(reg)), \ | ||
134 | outb( (value),PAS16_io_port(reg) ) ) | ||
135 | |||
136 | #endif | ||
137 | |||
138 | 122 | ||
139 | #define NCR5380_intr pas16_intr | 123 | #define NCR5380_intr pas16_intr |
140 | #define do_NCR5380_intr do_pas16_intr | 124 | #define do_NCR5380_intr do_pas16_intr |
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index eb7fae277fc6..339f018f8950 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c | |||
@@ -182,9 +182,8 @@ static int __init t128_detect(struct scsi_host_template *tpnt) | |||
182 | base = 0; | 182 | base = 0; |
183 | } else | 183 | } else |
184 | for (; !base && (current_base < NO_BASES); ++current_base) { | 184 | for (; !base && (current_base < NO_BASES); ++current_base) { |
185 | #if (TDEBUG & TDEBUG_INIT) | 185 | dprintk(NDEBUG_INIT, "t128: probing address 0x%08x\n", |
186 | printk("scsi-t128 : probing address %08x\n", bases[current_base].address); | 186 | bases[current_base].address); |
187 | #endif | ||
188 | if (bases[current_base].noauto) | 187 | if (bases[current_base].noauto) |
189 | continue; | 188 | continue; |
190 | p = ioremap(bases[current_base].address, 0x2000); | 189 | p = ioremap(bases[current_base].address, 0x2000); |
@@ -195,17 +194,13 @@ static int __init t128_detect(struct scsi_host_template *tpnt) | |||
195 | signatures[sig].string, | 194 | signatures[sig].string, |
196 | strlen(signatures[sig].string))) { | 195 | strlen(signatures[sig].string))) { |
197 | base = bases[current_base].address; | 196 | base = bases[current_base].address; |
198 | #if (TDEBUG & TDEBUG_INIT) | 197 | dprintk(NDEBUG_INIT, "t128: detected board\n"); |
199 | printk("scsi-t128 : detected board.\n"); | ||
200 | #endif | ||
201 | goto found; | 198 | goto found; |
202 | } | 199 | } |
203 | iounmap(p); | 200 | iounmap(p); |
204 | } | 201 | } |
205 | 202 | ||
206 | #if defined(TDEBUG) && (TDEBUG & TDEBUG_INIT) | 203 | dprintk(NDEBUG_INIT, "t128: base = 0x%08x\n", (unsigned int)base); |
207 | printk("scsi-t128 : base = %08x\n", (unsigned int) base); | ||
208 | #endif | ||
209 | 204 | ||
210 | if (!base) | 205 | if (!base) |
211 | break; | 206 | break; |
@@ -242,9 +237,8 @@ found: | |||
242 | printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); | 237 | printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); |
243 | } | 238 | } |
244 | 239 | ||
245 | #if defined(TDEBUG) && (TDEBUG & TDEBUG_INIT) | 240 | dprintk(NDEBUG_INIT, "scsi%d: irq = %d\n", |
246 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 241 | instance->host_no, instance->irq); |
247 | #endif | ||
248 | 242 | ||
249 | ++current_override; | 243 | ++current_override; |
250 | ++count; | 244 | ++count; |
diff --git a/drivers/scsi/t128.h b/drivers/scsi/t128.h index 2c7371454dfd..40c2fe7771e7 100644 --- a/drivers/scsi/t128.h +++ b/drivers/scsi/t128.h | |||
@@ -23,10 +23,6 @@ | |||
23 | #ifndef T128_H | 23 | #ifndef T128_H |
24 | #define T128_H | 24 | #define T128_H |
25 | 25 | ||
26 | #define TDEBUG 0 | ||
27 | #define TDEBUG_INIT 0x1 | ||
28 | #define TDEBUG_TRANSFER 0x2 | ||
29 | |||
30 | /* | 26 | /* |
31 | * The trantor boards are memory mapped. They use an NCR5380 or | 27 | * The trantor boards are memory mapped. They use an NCR5380 or |
32 | * equivalent (my sample board had part second sourced from ZILOG). | 28 | * equivalent (my sample board had part second sourced from ZILOG). |
@@ -92,20 +88,8 @@ | |||
92 | 88 | ||
93 | #define T128_address(reg) (base + T_5380_OFFSET + ((reg) * 0x20)) | 89 | #define T128_address(reg) (base + T_5380_OFFSET + ((reg) * 0x20)) |
94 | 90 | ||
95 | #if !(TDEBUG & TDEBUG_TRANSFER) | ||
96 | #define NCR5380_read(reg) readb(T128_address(reg)) | 91 | #define NCR5380_read(reg) readb(T128_address(reg)) |
97 | #define NCR5380_write(reg, value) writeb((value),(T128_address(reg))) | 92 | #define NCR5380_write(reg, value) writeb((value),(T128_address(reg))) |
98 | #else | ||
99 | #define NCR5380_read(reg) \ | ||
100 | (((unsigned char) printk("scsi%d : read register %d at address %08x\n"\ | ||
101 | , instance->hostno, (reg), T128_address(reg))), readb(T128_address(reg))) | ||
102 | |||
103 | #define NCR5380_write(reg, value) { \ | ||
104 | printk("scsi%d : write %02x to register %d at address %08x\n", \ | ||
105 | instance->hostno, (value), (reg), T128_address(reg)); \ | ||
106 | writeb((value), (T128_address(reg))); \ | ||
107 | } | ||
108 | #endif | ||
109 | 93 | ||
110 | #define NCR5380_intr t128_intr | 94 | #define NCR5380_intr t128_intr |
111 | #define do_NCR5380_intr do_t128_intr | 95 | #define do_NCR5380_intr do_t128_intr |