fix warning and small bug in cassini driver
PATCH 1/1 fix warning and small bug in cassini driver
Hi,
A small patch for you :)
This patch fixes the following compile warning:
drivers/net/cassini.c:1930: warning: long unsigned int format, different type arg (arg 4)
While fixing the warning I noticed that if USE_TX_COMPWB is not defined, then the printk will be in sore trouble since compwb won't be around. Fixed that as well. Perhaps a little ugly, but better than a bug IMHO.
Signed-off-by Jesper Juhl <[email protected]>
---
drivers/net/cassini.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
drivers/net/cassini.c +8 -3
@@ -1925,9 +1925,14 @@ static void cas_tx(struct net_device *de#ifdef USE_TX_COMPWB u64 compwb =le64_to_cpu (cp->init_block->tx_compwb);#endif -if (netif_msg_intr (cp)) -printk (KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n" , - cp->dev->name, status, compwb); +if (netif_msg_intr (cp)) { +printk (KERN_DEBUG "%s: tx interrupt, status: 0x%x" , + cp->dev->name, status); +#ifdef USE_TX_COMPWB +printk (", %llx" , compwb); +#endif +printk ("\n" ); + }/* process all the rings */ for (ring =0 ; ring <N_TX_RINGS ; ring++) {#ifdef USE_TX_COMPWB
drivers/net/cassini.c static void cas_tx(struct net_device *de · line 1932
Quoted 7 lines · Jesper Juhl
drivers/net/cassini.c:1930: warning: long unsigned int format, different type arg (arg 4)u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);drivers/net/cassini.c +1
-1- printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n", +printk (", %llx" , compwb);
You've added similar warning on alpha, sparc64, ...