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

* Re: [KJ] drivers/net/cassini.c: fix undefined variable
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-12-10 15:53 UTC (permalink / raw)
  To: kernel-janitors

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

On Tue, Dec 06, 2005 at 06:49:03PM +0100, walter harms wrote:
> The variable compwb is not defined if USE_TX_COMPWB is not defined.
> Also fixed is a trivial format warning.

> --- linux-2.6.14/drivers/net/cassini.c.bak
> +++ linux-2.6.14/drivers/net/cassini.c
> @@ -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);

AFAICS, u64 variables are printed as "%llx", (unsigned long long)


[-- Attachment #2: 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

* Re: [KJ] drivers/net/cassini.c: fix undefined variable
  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
  3 siblings, 0 replies; 5+ messages in thread
From: walter harms @ 2005-12-10 18:05 UTC (permalink / raw)
  To: kernel-janitors

Hi Alexey,
lets say i tried and it worked.
If i understand the code in vsprintf.c correcly the 'll' is equal 'L'.

re,
  walter

Alexey Dobriyan wrote:
> On Tue, Dec 06, 2005 at 06:49:03PM +0100, walter harms wrote:
>> The variable compwb is not defined if USE_TX_COMPWB is not defined.
>> Also fixed is a trivial format warning.
> 
>> --- linux-2.6.14/drivers/net/cassini.c.bak
>> +++ linux-2.6.14/drivers/net/cassini.c
>> @@ -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);
> 
> AFAICS, u64 variables are printed as "%llx", (unsigned long long)
> 
> 
> 
_______________________________________________
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

* Re: [KJ] drivers/net/cassini.c: fix undefined variable
  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
  3 siblings, 0 replies; 5+ messages in thread
From: Randy.Dunlap @ 2005-12-10 18:06 UTC (permalink / raw)
  To: kernel-janitors

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

On Sat, 10 Dec 2005 18:53:01 +0300 Alexey Dobriyan wrote:

> On Tue, Dec 06, 2005 at 06:49:03PM +0100, walter harms wrote:
> > The variable compwb is not defined if USE_TX_COMPWB is not defined.
> > Also fixed is a trivial format warning.
> 
> > --- linux-2.6.14/drivers/net/cassini.c.bak
> > +++ linux-2.6.14/drivers/net/cassini.c
> > @@ -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);
> 
> AFAICS, u64 variables are printed as "%llx", (unsigned long long)

AFAIK, they are cast to (unsigned long long) and printed with %llx, as:

		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
			cp->dev->name, status, (unsigned long long)compwb);

but I didn't test this, it's just from memory.

---
~Randy

[-- Attachment #2: 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

* Re: [KJ] drivers/net/cassini.c: fix undefined variable
  2005-12-06 17:49 [KJ] drivers/net/cassini.c: fix undefined variable walter harms
                   ` (2 preceding siblings ...)
  2005-12-10 18:06 ` Randy.Dunlap
@ 2005-12-10 18:41 ` Alexey Dobriyan
  3 siblings, 0 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-12-10 18:41 UTC (permalink / raw)
  To: kernel-janitors

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

On Sat, Dec 10, 2005 at 07:05:11PM +0100, walter harms wrote:
> Hi Alexey,
> lets say i tried and it worked.

On i386. On alpha you added the warning. And %llx is 4 times more common
than %Lx.

> Alexey Dobriyan wrote:
> >On Tue, Dec 06, 2005 at 06:49:03PM +0100, walter harms wrote:
> >>The variable compwb is not defined if USE_TX_COMPWB is not defined.
> >>Also fixed is a trivial format warning.
> >
> >>--- linux-2.6.14/drivers/net/cassini.c.bak
> >>+++ linux-2.6.14/drivers/net/cassini.c
> >>@@ -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);
> >
> >AFAICS, u64 variables are printed as "%llx", (unsigned long long)


[-- Attachment #2: 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.