diff options
author | Eric Anholt <[email protected]> | 2018-07-17 14:33:19 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-20 11:11:29 -0700 |
commit | 2f90879a34f7c542301d2728805757fbd869ff1c (patch) | |
tree | 11b72777ea3cbb542152201abaa5f6cbcc10e59e /src/gallium | |
parent | d0e53373e554831d3755d792d05055eb1a751c80 (diff) |
v3d: Use the list_first_entry/list_last_entry macros.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_bufmgr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c index f0018ea6936..ba9aa65ba89 100644 --- a/src/gallium/drivers/v3d/v3d_bufmgr.c +++ b/src/gallium/drivers/v3d/v3d_bufmgr.c @@ -66,12 +66,12 @@ v3d_bo_dump_stats(struct v3d_screen *screen) fprintf(stderr, " BOs cached size: %dkb\n", cache_size / 1024); if (!list_empty(&cache->time_list)) { - struct v3d_bo *first = LIST_ENTRY(struct v3d_bo, - cache->time_list.next, - time_list); - struct v3d_bo *last = LIST_ENTRY(struct v3d_bo, - cache->time_list.prev, - time_list); + struct v3d_bo *first = list_first_entry(&cache->time_list, + struct v3d_bo, + time_list); + struct v3d_bo *last = list_last_entry(&cache->time_list, + struct v3d_bo, + time_list); fprintf(stderr, " oldest cache time: %ld\n", (long)first->free_time); @@ -104,8 +104,8 @@ v3d_bo_from_cache(struct v3d_screen *screen, uint32_t size, const char *name) struct v3d_bo *bo = NULL; mtx_lock(&cache->lock); if (!list_empty(&cache->size_list[page_index])) { - bo = LIST_ENTRY(struct v3d_bo, cache->size_list[page_index].next, - size_list); + bo = list_first_entry(&cache->size_list[page_index], + struct v3d_bo, size_list); /* Check that the BO has gone idle. If not, then we want to * allocate something new instead, since we assume that the |