[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121023.044829.1915412359769438159.davem@davemloft.net>
Date: Tue, 23 Oct 2012 04:48:29 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: David.Laight@...LAB.COM
Cc: manabian@...il.com, nicolas.ferre@...el.com, hskinnemoen@...il.com,
egtvedt@...fundet.no, plagnioj@...osoft.com, bgat@...lgatliff.com,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 1/4] net/macb: fix truncate warnings
From: "David Laight" <David.Laight@...LAB.COM>
Date: Tue, 23 Oct 2012 09:21:11 +0100
>> 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.
-1 is equally an unsigned value of all 1's and completely legitimate.
The correction being made here is one of size not signedness.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists