diff options
author | Guillem Jover <guillem@hadrons.org> | 2011-08-30 03:09:42 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-31 00:48:48 +0200 |
commit | b0b830433d9afbd8c5a7562ac5cebd6db2eacaa6 (patch) | |
tree | 0a987ecd81239ae97d1a73dbcd6adeb307ced546 /linux/src/drivers/net/depca.c | |
parent | b580f5b65267608c9e634f1216b66de2a21549dc (diff) |
Fix undefined operation on assigning self pre-incremented variable
* linux/src/drivers/scsi/wd7000.c (mail_out): Add `1' instead of
pre-incrementing self assigned variable.
* linux/src/drivers/net/de4x5.c (de4x5_sw_reset, de4x5_queue_pkt, de4x5_rx)
(de4x5_tx, de4x5_rx_ovfc, set_multicast_list, ping_media, mii_get_phy)
(de4x5_ioctl): Likewise.
* linux/src/drivers/net/depca.c (depca_rx, depca_tx, load_packet): Likewise.
Diffstat (limited to 'linux/src/drivers/net/depca.c')
-rw-r--r-- | linux/src/drivers/net/depca.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/src/drivers/net/depca.c b/linux/src/drivers/net/depca.c index 8cf6fc8..e1b0342 100644 --- a/linux/src/drivers/net/depca.c +++ b/linux/src/drivers/net/depca.c @@ -966,7 +966,7 @@ depca_rx(struct 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); } @@ -976,7 +976,7 @@ depca_rx(struct device *dev) /* ** Update entry information */ - lp->rx_new = (++lp->rx_new) & lp->rxRingMask; + lp->rx_new = (lp->rx_new + 1) & lp->rxRingMask; } return 0; @@ -1017,7 +1017,7 @@ depca_tx(struct 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; @@ -1540,7 +1540,7 @@ static int load_packet(struct device *dev, struct sk_buff *skb) /* set up the buffer descriptors */ len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len; - for (i = entry; i != end; i = (++i) & lp->txRingMask) { + for (i = entry; i != end; i = (i + 1) & lp->txRingMask) { /* clean out flags */ writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base); writew(0x0000, &lp->tx_ring[i].misc); /* clears other error flags */ |