etnaviv: drm: use list_first_entry
Instead of open-coding the same logic. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32233>
This commit is contained in:
@@ -76,7 +76,7 @@ void etna_bo_cache_cleanup(struct etna_bo_cache *cache, time_t time)
|
||||
struct etna_bo *bo;
|
||||
|
||||
while (!list_is_empty(&bucket->list)) {
|
||||
bo = list_entry(bucket->list.next, struct etna_bo, list);
|
||||
bo = list_first_entry(&bucket->list, struct etna_bo, list);
|
||||
|
||||
/* keep things in cache for at least 1 second: */
|
||||
if (time && ((time - bo->free_time) <= 1))
|
||||
|
||||
Reference in New Issue
Block a user