Re: [PATCH] ttm: remove check of list iterator against head outside the loop

2022-03-21 Thread Christian König
Am 19.03.22 um 08:31 schrieb Xiaomeng Tong: When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element. While it is safe to use the pointer to determine if it was computed based o

[PATCH] ttm: remove check of list iterator against head outside the loop

2022-03-19 Thread Xiaomeng Tong
When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element. While it is safe to use the pointer to determine if it was computed based on the head element with &pos->member == head,