/* e1000_desc_unused - calculate if we have unused descriptors  */
static int e1000_desc_unused(struct e1000_ring *ring)
/* e1000_desc_unused - calculate if we have unused descriptors  */
static int e1000_desc_unused(struct e1000_ring *ring)
{
	if (ring->next_to_clean > ring->next_to_use)
		return ring->next_to_clean - ring->next_to_use - 1;
	return ring->count + ring->next_to_clean - ring->next_to_use - 1;
}