netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] depca: Fix warnings
@ 2011-02-01 11:32 Alan Cox
  2011-02-01 21:19 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2011-02-01 11:32 UTC (permalink / raw)
  To: netdev

From: Alan Cox <alan@linux.intel.com>

Replace the rather weird use of ++ with + 1 as the value is being assigned

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/net/depca.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 1b48b68..8b0084d 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1094,7 +1094,7 @@ static int depca_rx(struct net_device *dev)
 				}
 			}
 			/* Change buffer ownership for this last frame, back to the adapter */
-			for (; lp->rx_old != entry; lp->rx_old = (++lp->rx_old) & lp->rxRingMask) {
+			for (; lp->rx_old != entry; lp->rx_old = (lp->rx_old + 1) & lp->rxRingMask) {
 				writel(readl(&lp->rx_ring[lp->rx_old].base) | R_OWN, &lp->rx_ring[lp->rx_old].base);
 			}
 			writel(readl(&lp->rx_ring[entry].base) | R_OWN, &lp->rx_ring[entry].base);
@@ -1103,7 +1103,7 @@ static int depca_rx(struct net_device *dev)
 		/*
 		   ** Update entry information
 		 */
-		lp->rx_new = (++lp->rx_new) & lp->rxRingMask;
+		lp->rx_new = (lp->rx_new + 1) & lp->rxRingMask;
 	}
 
 	return 0;
@@ -1148,7 +1148,7 @@ static int depca_tx(struct net_device *dev)
 		}
 
 		/* Update all the pointers */
-		lp->tx_old = (++lp->tx_old) & lp->txRingMask;
+		lp->tx_old = (lp->tx_old + 1) & lp->txRingMask;
 	}
 
 	return 0;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] depca: Fix warnings
  2011-02-01 11:32 [PATCH] depca: Fix warnings Alan Cox
@ 2011-02-01 21:19 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-01 21:19 UTC (permalink / raw)
  To: alan; +Cc: netdev

From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Tue, 01 Feb 2011 11:32:29 +0000

> From: Alan Cox <alan@linux.intel.com>
> 
> Replace the rather weird use of ++ with + 1 as the value is being assigned
> 
> Signed-off-by: Alan Cox <alan@linux.intel.com>

Applied, thanks Alan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-01 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 11:32 [PATCH] depca: Fix warnings Alan Cox
2011-02-01 21:19 ` David Miller

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).