Thread (10 messages) flat view 10 messages, 4 authors, 2012-10-23
STALE5042d

Revision v3 of 11 in this series.

Revisions (11)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v2 [diff vs current]
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v3 [diff vs current]
  9. v3 [diff vs current]
  10. v3 current
  11. v3 [diff vs current]

[PATCH v3 1/4] net/macb: fix truncate warnings

From: davem@davemloft.net (David Miller)
Date: 2012-10-23 08:48:29
Also in: netdev

From: "David Laight" <redacted>
Date: Tue, 23 Oct 2012 09:21:11 +0100
quoted
When building macb on x86_64 the following warnings show up:
  drivers/net/ethernet/cadence/macb.c: In function macb_interrupt:
  drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow]
...
quoted
-			macb_writel(bp, IDR, ~0UL);
+			macb_writel(bp, IDR, -1);
Seems wrong to fix an error with an unsigned value
by using -1.
-1 is equally an unsigned value of all 1's and completely legitimate.
The correction being made here is one of size not signedness.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help