[PATCH 05/10] net/macb: clean up ring buffer logic

2012-09-05 Thread Nicolas Ferre
From: Havard Skinnemoen Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes the code slightly

[PATCH 05/10] net/macb: clean up ring buffer logic

2012-09-05 Thread Nicolas Ferre
From: Havard Skinnemoen hav...@skinnemoen.net Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes