lkml.org 
[lkml]   [2005]   [Nov]   [9]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
DateWed, 9 Nov 2005 00:57:39 -0500
FromDave Jones <>
Subjectfix sparse warning in horizon atm driver.
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-11-09 07:00    [W:0.671 / U:0.030 seconds]
©2003-2008 Jasper Spaans