All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] drivers/net/cassini.c: fix undefined variable
Date: Tue, 06 Dec 2005 17:49:03 +0000	[thread overview]
Message-ID: <4395CF0F.9070206@bfs.de> (raw)

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

The variable compwb is not defined if USE_TX_COMPWB is not defined.
Also fixed is a trivial format warning.

in case tunderbird wraped my lines i added the patch as attachment also
sign-off-by: walter <wharms@bfs.de>


--- linux-2.6.14/drivers/net/cassini.c.bak	2005-12-03 2:17:53.000000000 
+0100
+++ linux-2.6.14/drivers/net/cassini.c	2005-12-03 22:41:33.000000000 +0100
@@ -1922,11 +1922,12 @@
  		   u32 status)
  {
          int limit, ring;
+	u64 compwb=0;
  #ifdef USE_TX_COMPWB
-	u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
+	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",
+		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %Lx\n",
  			cp->dev->name, status, compwb);
  	/* process all the rings */
  	for (ring = 0; ring < N_TX_RINGS; ring++) {

[-- Attachment #2: cassini.c.diff --]
[-- Type: text/x-patch, Size: 783 bytes --]

The variable compwb is not defined if USE_TX_COMPWB is not defined.
Also fixed is a trivial format warning.

sign-off: walter <wharms@bfs.de>


--- linux-2.6.14/drivers/net/cassini.c.bak	2005-12-03 22:17:53.000000000 +0100
+++ linux-2.6.14/drivers/net/cassini.c	2005-12-03 22:41:33.000000000 +0100
@@ -1922,11 +1922,12 @@
 		   u32 status)
 {
         int limit, ring;
+	u64 compwb=0;
 #ifdef USE_TX_COMPWB
-	u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
+	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",
+		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %Lx\n",
 			cp->dev->name, status, compwb);
 	/* process all the rings */
 	for (ring = 0; ring < N_TX_RINGS; ring++) {

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2005-12-06 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06 17:49 walter harms [this message]
2005-12-10 15:53 ` [KJ] drivers/net/cassini.c: fix undefined variable Alexey Dobriyan
2005-12-10 18:05 ` walter harms
2005-12-10 18:06 ` Randy.Dunlap
2005-12-10 18:41 ` 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=4395CF0F.9070206@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.