mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Adrian Sun <asun@darksunrising.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix warning and small bug in cassini driver
Date: Mon, 17 Oct 2005 20:24:52 +0200	[thread overview]
Message-ID: <200510172024.53106.jesper.juhl@gmail.com> (raw)

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




             reply	other threads:[~2005-10-17 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 18:24 Jesper Juhl [this message]
2005-10-18  5:34 ` Alexey Dobriyan

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=200510172024.53106.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=asun@darksunrising.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome