Re: [PATCH] drm/vmwgfx: Fix two list_for_each loop exit tests

2020-07-14 Thread Roland Scheidegger
Am 14.07.20 um 10:25 schrieb Dan Carpenter: > On Tue, Jul 14, 2020 at 03:39:13AM +0200, Roland Scheidegger wrote: >> Am 26.06.20 um 12:39 schrieb Dan Carpenter: >>> These if statements are supposed to be true if we ended the >>> list_for_each_entry() loops without hitting a break statement but they

Re: [PATCH] drm/vmwgfx: Fix two list_for_each loop exit tests

2020-07-14 Thread Dan Carpenter
On Tue, Jul 14, 2020 at 03:39:13AM +0200, Roland Scheidegger wrote: > Am 26.06.20 um 12:39 schrieb Dan Carpenter: > > These if statements are supposed to be true if we ended the > > list_for_each_entry() loops without hitting a break statement but they > > don't work. > > > > In the first loop, we

Re: [PATCH] drm/vmwgfx: Fix two list_for_each loop exit tests

2020-07-13 Thread Roland Scheidegger
Am 26.06.20 um 12:39 schrieb Dan Carpenter: > These if statements are supposed to be true if we ended the > list_for_each_entry() loops without hitting a break statement but they > don't work. > > In the first loop, we increment "i" after the "if (i == unit)" condition > so we don't necessarily kn

[PATCH] drm/vmwgfx: Fix two list_for_each loop exit tests

2020-06-26 Thread Dan Carpenter
These if statements are supposed to be true if we ended the list_for_each_entry() loops without hitting a break statement but they don't work. In the first loop, we increment "i" after the "if (i == unit)" condition so we don't necessarily know that "i" is not equal to unit at the end of the loop.