[5/8] fix printk() type warning in drivers/net/starfire.c

[5/8] fix printk() type warning in drivers/net/starfire.c

Post by w.. » Fri, 06 Dec 2002 13:00:19



Change the format to %Lx and cast to u64 unconditionally.
Jeff, this is yours to ack.

===== drivers/net/starfire.c 1.22 vs edited =====
--- 1.22/drivers/net/starfire.c Wed Nov 27 23:09:51 2002

 #ifdef __i386__
        if (debug > 2) {
-               printk("\n"KERN_DEBUG"  Tx ring at %8.8x:\n",
-                          np->tx_ring_dma);
+               printk("\n"KERN_DEBUG"  Tx ring at %8.8Lx:\n",
+                          (u64)np->tx_ring_dma);
                for (i = 0; i < 8 /* TX_RING_SIZE is huge! */; i++)
                        printk(KERN_DEBUG " #%d desc. %8.8x %8.8x -> %8.8x.\n",
                               i, le32_to_cpu(np->tx_ring[i].status),
                               le32_to_cpu(np->tx_ring[i].first_addr),
                               le32_to_cpu(np->tx_done_q[i].status));
-               printk(KERN_DEBUG "  Rx ring at %8.8x -> %p:\n",
-                      np->rx_ring_dma, np->rx_done_q);
+               printk(KERN_DEBUG "  Rx ring at %8.8Lx -> %p:\n",
+                      (u64)np->rx_ring_dma, np->rx_done_q);
                if (np->rx_done_q)
                        for (i = 0; i < 8 /* RX_RING_SIZE */; i++) {
                                printk(KERN_DEBUG " #%d desc. %8.8x -> %8.8x\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

[5/8] fix printk() type warning in drivers/net/starfire.c

Post by w.. » Fri, 06 Dec 2002 13:10:11


Change the function return type so as to match the required initcall
prototype. Alan, this is yours to ack.

===== arch/i386/kernel/io_apic.c 1.33 vs edited =====
--- 1.33/arch/i386/kernel/io_apic.c     Wed Nov 20 07:20:10 2002

  *     APIC bugs then we can allow the modify fast path
  */

-static void __init io_apic_bug_finalize(void)
+static int __init io_apic_bug_finalize(void)
 {
        if(sis_apic_bug == -1)
                sis_apic_bug = 0;
+       return 0;
 }

 late_initcall(io_apic_bug_finalize);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

[5/8] fix printk() type warning in drivers/net/starfire.c

Post by w.. » Fri, 06 Dec 2002 13:10:15


Cast to u64 and always print as %Lx to prevent type clashes.
Jeff, this is yours to ack.

===== drivers/net/tulip/interrupt.c 1.14 vs edited =====
--- 1.14/drivers/net/tulip/interrupt.c  Mon Oct 28 21:14:42 2002

                                if (tp->rx_buffers[entry].mapping !=
                                    le32_to_cpu(tp->rx_ring[entry].buffer1)) {
                                        printk(KERN_ERR "%s: Internal fault: The skbuff addresses "
-                                              "do not match in tulip_rx: %08x vs. %08x %p / %p.\n",
+                                              "do not match in tulip_rx: %08x vs. %08Lx %p / %p.\n",
                                               dev->name,
                                               le32_to_cpu(tp->rx_ring[entry].buffer1),
-                                              tp->rx_buffers[entry].mapping,
+                                              (u64)tp->rx_buffers[entry].mapping,
                                               skb->head, temp);
                                }
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

[5/8] fix printk() type warning in drivers/net/starfire.c

Post by Alan Co » Fri, 06 Dec 2002 19:00:19



> Change the function return type so as to match the required initcall
> prototype. Alan, this is yours to ack.

Already iny my tree - ack

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

[5/8] fix printk() type warning in drivers/net/starfire.c

Post by Jeff Garzi » Fri, 06 Dec 2002 19:00:21


your net drivers patches look ok to me.  I'll merge them in the next day
or so, if Linus does not.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. one more starfire net driver fix for 2.4.7pre6

Hi,

This patch reverses the MII hunk from the previous patch, which was
apparently breaking some cards. It also fixes an incorrect comment.

Please apply.

Thanks,
Ion

--
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
---------------------------------
--- linux-2.4/drivers/net/starfire.c.orig       Thu Jul 12 10:15:18 2001

        LK1.3.3 (Ion Badulescu)
        - Initialize the TxMode register properly
-       - Set the MII registers _after_ resetting it
-       - Don't dereference dev->priv after unregister_netdev() has freed it
+       - Don't dereference dev->priv after freeing it

 TODO:

        struct netdev_private *np = dev->priv;
        u16 reg0;

+       mdio_write(dev, np->phys[0], MII_ADVERTISE, np->advertising);
        mdio_write(dev, np->phys[0], MII_BMCR, BMCR_RESET);
        udelay(500);
        while (mdio_read(dev, np->phys[0], MII_BMCR) & BMCR_RESET);

        reg0 = mdio_read(dev, np->phys[0], MII_BMCR);
-       mdio_write(dev, np->phys[0], MII_ADVERTISE, np->advertising);

        if (np->autoneg) {

                pci_free_consistent(pdev, PAGE_SIZE,
                                    np->rx_ring, np->rx_ring_dma);

-       unregister_netdev(dev);                 /* Will also free np!! */
+       unregister_netdev(dev);
        iounmap((char *)dev->base_addr);
        pci_release_regions(pdev);

        pci_set_drvdata(pdev, NULL);
-       kfree(dev);
+       kfree(dev);                     /* Will also free np!! */
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. diald-dynamic-IP-masquerading problem

3. one more starfire net driver fix for 2.4.7pre6+

4. FTP issue

5. Fix starfire compiler warning on PAE

6. umount /home busy

7. fix warning in drivers/net/sis900.c

8. Partition Sizes LinuxPPC 2k

9. starfire net driver update

10. starfire net driver update for 2.4.19pre2

11. starfire net driver update for 2.2.21pre3

12. printk fixes for cs4281 driver