diff options
author | Joachim Eastwood <manabian@gmail.com> | 2012-10-22 08:45:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-23 02:40:09 -0400 |
commit | 95ebcea69c888fc644e2a64586c74e2299ca47ca (patch) | |
tree | 9c4fcff20cb916ba74d84ae27ebcc0835c591a51 /drivers/net/ethernet/cadence/macb.c | |
parent | 51ebd3181572af8d5076808dab2682d800f6da5d (diff) | |
download | blackbird-op-linux-95ebcea69c888fc644e2a64586c74e2299ca47ca.tar.gz blackbird-op-linux-95ebcea69c888fc644e2a64586c74e2299ca47ca.zip |
net/macb: fix truncate warnings
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]
drivers/net/ethernet/cadence/macb.c: In function macb_reset_hw:
drivers/net/ethernet/cadence/macb.c:792:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
drivers/net/ethernet/cadence/macb.c:793:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
drivers/net/ethernet/cadence/macb.c:796:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Use -1 insted of ~0UL, as done in other places in the driver,
to silence these warnings.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.c')
-rw-r--r-- | drivers/net/ethernet/cadence/macb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 6c84a1104aff..6a4f4998cfe5 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -553,7 +553,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) while (status) { /* close possible race with dev_close */ if (unlikely(!netif_running(dev))) { - macb_writel(bp, IDR, ~0UL); + macb_writel(bp, IDR, -1); break; } @@ -789,11 +789,11 @@ static void macb_reset_hw(struct macb *bp) macb_writel(bp, NCR, MACB_BIT(CLRSTAT)); /* Clear all status flags */ - macb_writel(bp, TSR, ~0UL); - macb_writel(bp, RSR, ~0UL); + macb_writel(bp, TSR, -1); + macb_writel(bp, RSR, -1); /* Disable all interrupts */ - macb_writel(bp, IDR, ~0UL); + macb_writel(bp, IDR, -1); macb_readl(bp, ISR); } |