diff --git a/[refs] b/[refs] index 1535bc5dab25..3d8bafe1d700 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f2e46561cc1afa82b18b2fc6efc8510ec57c7d7d +refs/heads/master: 129372d0524c9124d5693f63c1d3c1ce2e3714ce diff --git a/trunk/drivers/net/sky2.c b/trunk/drivers/net/sky2.c index eae270d81808..2dd46a05fb30 100644 --- a/trunk/drivers/net/sky2.c +++ b/trunk/drivers/net/sky2.c @@ -1039,7 +1039,7 @@ static int sky2_up(struct net_device *dev) /* Modular subtraction in ring */ static inline int tx_dist(unsigned tail, unsigned head) { - return (head >= tail ? head : head + TX_RING_SIZE) - tail; + return (head - tail) % TX_RING_SIZE; } /* Number of list elements available for next tx */