All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] drivers/net/cassini.c: fix undefined variable
@ 2005-12-06 17:49 walter harms
  2005-12-10 15:53 ` Alexey Dobriyan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: walter harms @ 2005-12-06 17:49 UTC (permalink / raw)
  To: kernel-janitors

[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-12-10 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-06 17:49 [KJ] drivers/net/cassini.c: fix undefined variable walter harms
2005-12-10 15:53 ` Alexey Dobriyan
2005-12-10 18:05 ` walter harms
2005-12-10 18:06 ` Randy.Dunlap
2005-12-10 18:41 ` Alexey Dobriyan

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.