public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com,
	tsbogend@alpha.franken.de
Subject: [patch] Fix AMD PCNet32 printk's
Date: Tue, 21 Nov 2000 23:25:09 +0100	[thread overview]
Message-ID: <20001121232509.A252@suse.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Hi!

Someone overzealously added too many KERN_INFOs to pcnet32, so that they
appear not only at the beginning of each line, but also many times in
between words. This is wrong.

This patch removes the extraneous KERN_* from pcnet32. It leaves all
those that should be there in place. It does not change anything else.

It's against 2.4.0-test11.

-- 
Vojtech Pavlik
SuSE Labs

[-- Attachment #2: pcnet32-printk.diff --]
[-- Type: text/plain, Size: 4212 bytes --]

diff -urN linux-2.4.0-test11/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux-2.4.0-test11/drivers/net/pcnet32.c	Tue Nov 21 23:04:24 2000
+++ linux/drivers/net/pcnet32.c	Tue Nov 21 20:56:57 2000
@@ -483,7 +483,7 @@
     printk(KERN_INFO "pcnet32_probe_pci: found device %#08x.%#08x\n", ent->vendor, ent->device);
 
     ioaddr = pci_resource_start (pdev, 0);
-    printk(KERN_INFO "  ioaddr=%#08lx  resource_flags=%#08lx\n", ioaddr, pci_resource_flags (pdev, 0));
+    printk(KERN_INFO "    ioaddr=%#08lx  resource_flags=%#08lx\n", ioaddr, pci_resource_flags (pdev, 0));
     if (!ioaddr) {
         printk (KERN_ERR "no PCI IO resources, aborting\n");
         return -ENODEV;
@@ -627,29 +627,29 @@
     /* There is a 16 byte station address PROM at the base address.
        The first six bytes are the station address. */
     for (i = 0; i < 6; i++)
-	printk( KERN_INFO " %2.2x", dev->dev_addr[i] = inb(ioaddr + i));
+	printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i));
 
     if (((chip_version + 1) & 0xfffe) == 0x2624) { /* Version 0x2623 or 0x2624 */
 	i = a->read_csr(ioaddr, 80) & 0x0C00;  /* Check tx_start_pt */
-	printk(KERN_INFO"\n    tx_start_pt(0x%04x):",i);
+	printk("\n" KERN_INFO "    tx_start_pt(0x%04x):",i);
 	switch(i>>10) {
-	    case 0: printk(KERN_INFO "  20 bytes,"); break;
-	    case 1: printk(KERN_INFO "  64 bytes,"); break;
-	    case 2: printk(KERN_INFO " 128 bytes,"); break;
-	    case 3: printk(KERN_INFO "~220 bytes,"); break;
+	    case 0: printk("  20 bytes,"); break;
+	    case 1: printk("  64 bytes,"); break;
+	    case 2: printk(" 128 bytes,"); break;
+	    case 3: printk("~220 bytes,"); break;
 	}
 	i = a->read_bcr(ioaddr, 18);  /* Check Burst/Bus control */
-	printk(KERN_INFO" BCR18(%x):",i&0xffff);
-	if (i & (1<<5)) printk(KERN_INFO "BurstWrEn ");
-	if (i & (1<<6)) printk(KERN_INFO "BurstRdEn ");
-	if (i & (1<<7)) printk(KERN_INFO "DWordIO ");
-	if (i & (1<<11)) printk(KERN_INFO"NoUFlow ");
+	printk(" BCR18(%x):",i&0xffff);
+	if (i & (1<<5)) printk("BurstWrEn ");
+	if (i & (1<<6)) printk("BurstRdEn ");
+	if (i & (1<<7)) printk("DWordIO ");
+	if (i & (1<<11)) printk("NoUFlow ");
 	i = a->read_bcr(ioaddr, 25);
-	printk(KERN_INFO "\n    SRAMSIZE=0x%04x,",i<<8);
+	printk("\n" KERN_INFO "    SRAMSIZE=0x%04x,",i<<8);
 	i = a->read_bcr(ioaddr, 26);
-	printk(KERN_INFO " SRAM_BND=0x%04x,",i<<8);
+	printk(" SRAM_BND=0x%04x,",i<<8);
 	i = a->read_bcr(ioaddr, 27);
-	if (i & (1<<14)) printk(KERN_INFO "LowLatRx,");
+	if (i & (1<<14)) printk("LowLatRx");
     }
 
     dev->base_addr = ioaddr;
@@ -662,7 +662,7 @@
     memset(lp, 0, sizeof(*lp));
     lp->dma_addr = lp_dma_addr;
     lp->pci_dev = pdev;
-    printk(KERN_INFO "pcnet32: pcnet32_private lp=%p lp_dma_addr=%#08x\n", lp, lp_dma_addr);
+    printk("\n" KERN_INFO "pcnet32: pcnet32_private lp=%p lp_dma_addr=%#08x", lp, lp_dma_addr);
 
     spin_lock_init(&lp->lock);
     
@@ -713,7 +713,7 @@
     }
     
     if (dev->irq >= 2)
-	printk(KERN_INFO " assigned IRQ %d.\n", dev->irq);
+	printk(" assigned IRQ %d.\n", dev->irq);
     else {
 	unsigned long irq_mask = probe_irq_on();
 	
@@ -728,9 +728,9 @@
 	
 	dev->irq = probe_irq_off (irq_mask);
 	if (dev->irq)
-	    printk(KERN_INFO ", probed IRQ %d.\n", dev->irq);
+	    printk(", probed IRQ %d.\n", dev->irq);
 	else {
-	    printk(KERN_ERR ", failed to detect IRQ line.\n");
+	    printk(", failed to detect IRQ line.\n");
 	    return -ENODEV;
 	}
     }
@@ -978,14 +978,14 @@
 	       lp->dirty_tx, lp->cur_tx, lp->tx_full ? " (full)" : "",
 	       lp->cur_rx);
 	    for (i = 0 ; i < RX_RING_SIZE; i++)
-	    printk(KERN_DEBUG "%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
+	    printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
 		   lp->rx_ring[i].base, -lp->rx_ring[i].buf_length,
 		   lp->rx_ring[i].msg_length, (unsigned)lp->rx_ring[i].status);
 	    for (i = 0 ; i < TX_RING_SIZE; i++)
-	    printk(KERN_DEBUG "%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
+	    printk("%s %08x %04x %08x %04x", i & 1 ? "" : "\n ",
 		   lp->tx_ring[i].base, -lp->tx_ring[i].length,
 		   lp->tx_ring[i].misc, (unsigned)lp->tx_ring[i].status);
-	    printk(KERN_DEBUG "\n");
+	    printk("\n");
 	}
 	pcnet32_restart(dev, 0x0042);
 

                 reply	other threads:[~2000-11-21 22:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001121232509.A252@suse.cz \
    --to=vojtech@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox