Re: [PATCH] cxgb4: fix signed wrap around when decrementing index idx

2016-09-21 Thread David Miller
From: Colin King Date: Tue, 20 Sep 2016 15:48:45 +0100 > From: Colin Ian King > > Change predecrement compare to post decrement compare to avoid an > unsigned integer wrap-around comparison when decrementing idx in > the while loop. > > For example, when idx is zero, the current situation will

[PATCH] cxgb4: fix signed wrap around when decrementing index idx

2016-09-20 Thread Colin King
From: Colin Ian King Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparison when decrementing idx in the while loop. For example, when idx is zero, the current situation will predecrement idx in the while loop, wrapping idx to the maximum signed

[PATCH] cxgb4: fix signed wrap around when decrementing index idx

2016-09-20 Thread Colin King
From: Colin Ian King Change predecrement compare to post decrement compare to avoid an unsigned integer wrap-around comparison when decrementing idx in the while loop. For example, when idx is zero, the current situation will predecrement idx in the while loop, wrapping idx to the maximum signed