[PATCH] fix warning and small bug in cassini driver

From: Jesper Juhl (jesper.juhl_at_gmail.com)
Date: 10/17/05

  • Next message: Dipankar Sarma: "Re: VFS: file-max limit 50044 reached"
    To: Adrian Sun <asun@darksunrising.com>
    Date:	Mon, 17 Oct 2005 20:24:52 +0200
    
    

    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 <jesper.juhl@gmail.com>

    ---
     drivers/net/cassini.c |   11 ++++++++---
     1 files changed, 8 insertions(+), 3 deletions(-)
    --- linux-2.6.14-rc4-mm1-orig/drivers/net/cassini.c	2005-10-11 22:41:10.000000000 +0200
    +++ linux-2.6.14-rc4-mm1/drivers/net/cassini.c	2005-10-17 20:16:51.000000000 +0200
    @@ -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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Dipankar Sarma: "Re: VFS: file-max limit 50044 reached"

    Relevant Pages

    • [PATCH][BUGFIX] : Megaraid patch for 2.6 2/5
      ... On Linux-SCSI over the last few days I have been discussing a couple of ... This patch fixes the problem ... has been one comment made about the #ifdef CONFIG_PROC_FS not being ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] ppc32: More preempt fixes
      ... This patch fixes more cases of possible preempt issue when testing ... +#ifdef CONFIG_ALTIVEC ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] isolcpus option broken in 2.6.10-rc2-bk2
      ... being properly initialized (which results in a panic at bootup). ... The following patch fixes this. ... #ifdef CONFIG_NUMA ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch] 2.6.9-rc4-mm1: compile error with BLK_DEV_IDEDMA=n
      ... This patch causes the following compile error with ... The following patch fixes this problem: ... +#ifdef CONFIG_BLK_DEV_IDEDMA ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.4 patch] fix a agpgart_be.c compile warning
      ... I got the following compile warning in 2.4.25-pre8: ... The following patch fixes this issue: ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)