From: David Miller <davem@davemloft.net>
To: David.Laight@ACULAB.COM
Cc: manabian@gmail.com, nicolas.ferre@atmel.com,
hskinnemoen@gmail.com, egtvedt@samfundet.no,
plagnioj@jcrosoft.com, bgat@billgatliff.com,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/4] net/macb: fix truncate warnings
Date: Tue, 23 Oct 2012 04:48:29 -0400 (EDT) [thread overview]
Message-ID: <20121023.044829.1915412359769438159.davem@davemloft.net> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B705B@saturn3.aculab.com>
From: "David Laight" <David.Laight@ACULAB.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.
next prev parent reply other threads:[~2012-10-23 8:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 18:45 [PATCH v3 0/4] make cadence ethernet drivers build on any architecture Joachim Eastwood
2012-10-22 18:45 ` [PATCH v3 1/4] net/macb: fix truncate warnings Joachim Eastwood
2012-10-23 8:21 ` David Laight
2012-10-23 8:48 ` David Miller [this message]
2012-10-23 12:00 ` Lothar Waßmann
2012-10-23 17:20 ` Joachim Eastwood
2012-10-22 18:45 ` [PATCH v3 2/4] net/cadence: get rid of HAVE_NET_MACB Joachim Eastwood
2012-10-22 18:45 ` [PATCH v3 3/4] net/at91_ether: select MACB in Kconfig Joachim Eastwood
2012-10-22 18:45 ` [PATCH v3 4/4] net/at91_ether: add pdata flag for reverse Eth addr Joachim Eastwood
2012-10-23 6:40 ` [PATCH v3 0/4] make cadence ethernet drivers build on any architecture David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121023.044829.1915412359769438159.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Laight@ACULAB.COM \
--cc=bgat@billgatliff.com \
--cc=egtvedt@samfundet.no \
--cc=hskinnemoen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=manabian@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).