From e3257f746183553aafee2b59350e6eb195c532c1 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 13 Nov 2024 17:39:04 +0100 Subject: [PATCH] etnaviv: drm: use list_first_entry Instead of open-coding the same logic. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/etnaviv/drm/etnaviv_bo_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etnaviv/drm/etnaviv_bo_cache.c b/src/etnaviv/drm/etnaviv_bo_cache.c index 0930f3afa1c..29cdada33b4 100644 --- a/src/etnaviv/drm/etnaviv_bo_cache.c +++ b/src/etnaviv/drm/etnaviv_bo_cache.c @@ -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))