[PATCH v3 1/4] net/macb: fix truncate warnings
From: Lothar Waßmann <hidden>
Date: 2012-10-23 12:00:44
Also in:
netdev
Hi, David Miller writes:
From: "David Laight" <redacted> Date: Tue, 23 Oct 2012 09:21:11 +0100quoted
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.
You could use '~0' (without the 'UL'). Lothar Wa?mann -- ___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________