Searched hist:c027aa9201eb9af8067282d4b8a7ce7523cd3c8d (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/net/ethernet/freescale/enetc/ |
H A D | enetc.h | diff c027aa9201eb9af8067282d4b8a7ce7523cd3c8d Wed Mar 10 06:03:47 CST 2021 Vladimir Oltean <olteanv@gmail.com> net: enetc: simplify callers of enetc_rxbd_next
When we iterate through the BDs in the RX ring, the software producer index (which is already passed by value to enetc_rxbd_next) lags behind, and we end up with this funny looking "++i == rx_ring->bd_count" check so that we drag it after us.
Let's pass the software producer index "i" by reference, so that enetc_rxbd_next can increment it by itself (mod rx_ring->bd_count), especially since enetc_rxbd_next has to increment the index anyway.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | enetc.c | diff c027aa9201eb9af8067282d4b8a7ce7523cd3c8d Wed Mar 10 06:03:47 CST 2021 Vladimir Oltean <olteanv@gmail.com> net: enetc: simplify callers of enetc_rxbd_next
When we iterate through the BDs in the RX ring, the software producer index (which is already passed by value to enetc_rxbd_next) lags behind, and we end up with this funny looking "++i == rx_ring->bd_count" check so that we drag it after us.
Let's pass the software producer index "i" by reference, so that enetc_rxbd_next can increment it by itself (mod rx_ring->bd_count), especially since enetc_rxbd_next has to increment the index anyway.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|