All of lore.kernel.org
 help / color / mirror / Atom feed
* fix sparse warning in horizon atm driver.
@ 2005-11-09  5:57 Dave Jones
  2005-11-09 21:07 ` David S. Miller
  2005-11-10 16:00 ` chas williams - CONTRACTOR
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Jones @ 2005-11-09  5:57 UTC (permalink / raw)
  To: Linux Kernel

these vars get fed u32's, and are OR'd with u32's.
Chances are they were meant to be u32's.

I don't have hardware to test this, but I can't fathom
why a u16 would be used here.

drivers/atm/horizon.c:1564:12: warning: cast truncates bits from constant value (40000000 becomes 0)
drivers/atm/horizon.c:1565:12: warning: cast truncates bits from constant value (40000000 becomes 0)
drivers/atm/horizon.c:1569:12: warning: cast truncates bits from constant value (80000000 becomes 0)
drivers/atm/horizon.c:1570:12: warning: cast truncates bits from constant value (80000000 becomes 0)

Signed-off-by: Dave Jones <davej@redhat.com>

--- linus/drivers/atm/horizon.c~	2005-11-09 00:51:50.000000000 -0500
+++ linus/drivers/atm/horizon.c	2005-11-09 00:55:36.000000000 -0500
@@ -1511,8 +1511,8 @@ static inline short setup_idle_tx_channe
     // a.k.a. prepare the channel and remember that we have done so.
     
     tx_ch_desc * tx_desc = &memmap->tx_descs[tx_channel];
-    u16 rd_ptr;
-    u16 wr_ptr;
+    u32 rd_ptr;
+    u32 wr_ptr;
     u16 channel = vcc->channel;
     
     unsigned long flags;

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

end of thread, other threads:[~2005-11-10 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09  5:57 fix sparse warning in horizon atm driver Dave Jones
2005-11-09 21:07 ` David S. Miller
2005-11-10 16:00 ` chas williams - CONTRACTOR
2005-11-10 20:56   ` David S. Miller

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.