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:
Lucas Stach 2024-11-13 17:39:04 +01:00 committed by Marge Bot
parent 916bd73f1d
commit e3257f7461

View file

@ -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))