[parisc-linux-cvs] tidy up sim700 output on boot

Richard Hirst rhirst@linuxcare.com
Thu, 7 Jun 2001 23:17:54 +0100


Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.45
diff -u -r1.45 Makefile
--- Makefile	2001/06/06 19:46:31	1.45
+++ Makefile	2001/06/07 21:55:49
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -pa12
+EXTRAVERSION = -pa13
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: drivers/scsi/sim700.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/sim700.c,v
retrieving revision 1.27
diff -u -r1.27 sim700.c
--- sim700.c	2001/04/17 17:20:10	1.27
+++ sim700.c	2001/06/07 21:55:53
@@ -128,7 +128,7 @@
 #define DEB_ANY		0xffff	/* Any and all debug options		*/
 
 #ifdef DEBUG
-#define DEB(m,x) if (sim700_debug & m) x
+#define DEB(m,x) do { if (sim700_debug & m) x; }  while(0)
 int sim700_debug = DEB_NONE; //DEB_ANY & ~DEB_FIXUP;
 #else
 #define DEB(m,x)
@@ -1717,11 +1717,11 @@
     memset(hostdata, 0, sizeof(struct sim700_hostdata));
     hostdata->targets = pci_alloc_consistent(NULL, PAGE_SIZE << 3, &dma_addr);
     if (!hostdata->targets) {
-	printk("sim700: Couldn't get consistent shared memory\n");
+	DEB(DEB_ANY, printk("sim700: Couldn't get consistent shared memory\n"));
 	dma_consistent = 0;
 	hostdata->targets = (void *)__get_free_pages(GFP_ATOMIC, 3);
         if (!hostdata->targets) {
-	    printk("sim700: Couldn't get in-consistent shared memory\n");
+	    printk("sim700: Couldn't allocate shared memory\n");
 	    goto err1;
 	}
 	dma_addr = virt_to_bus(hostdata->targets);
@@ -1799,7 +1799,7 @@
     dstat = NCR_read8(DSTAT_REG);
     probed_irq = probe_irq_off(irq_mask);
 
-    printk("Post test1, istat %02x, sstat0 %02x, dstat %02x\n", istat, sstat0, dstat);
+    DEB(DEB_ANY, printk("Post test1, istat %02x, sstat0 %02x, dstat %02x\n", istat, sstat0, dstat));
     if (requested_irq == 0) {
 	if (probed_irq > 0) {
 	    printk("sim700: Chip is using IRQ %d\n", probed_irq);
@@ -1816,18 +1816,18 @@
 		printk("sim700: WARNING requested IRQ %d, but probed as %d\n",
 			requested_irq, probed_irq);
     else if (probed_irq <= 0)
-		printk("sim700: WARNING IRQ probe failed, (returned %d)\n",
-			probed_irq);
+		DEB(DEB_ANY, printk("sim700: WARNING IRQ probe failed, (returned %d)\n",
+			probed_irq));
   
 
     dsps = NCR_read32(DSPS_REG);
 #if 1
     if (dsps == A_int_test1a)
-	printk("scsi%d: WARNING: target data areas are not dma coherent!\n",
-			host->host_no);
+	DEB(DEB_ANY, printk("scsi%d: WARNING: target data areas are not dma coherent!\n",
+			host->host_no));
     else if (dsps == A_int_test1b)
-	printk("scsi%d: Good, target data areas are dma coherent\n",
-			host->host_no);
+	DEB(DEB_ANY, printk("scsi%d: Good, target data areas are dma coherent\n",
+			host->host_no));
     else {
 	printk("scsi%d: test 1 FAILED: dsps: exp 0x%08x, got 0x%08x\n",
 			host->host_no, A_int_test1a, dsps);