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

David Laight David.Laight at ACULAB.COM
Tue Oct 23 04:21:11 EDT 2012


> 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]
...
> -			macb_writel(bp, IDR, ~0UL);
> +			macb_writel(bp, IDR, -1);

Seems wrong to fix an error with an unsigned value
by using -1.

	David






More information about the linux-arm-kernel mailing list