diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-22 08:36:30 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-28 11:49:22 +0100 |
commit | 4a6c156f56beaaf83102c8b29baeef070c697093 (patch) | |
tree | 82f4383e05456d1c71cb81ec703a3a021030bfc2 /drivers | |
parent | 25a7bb18346f94eef9125d54e3b010ae97d03635 (diff) | |
download | linux-4a6c156f56beaaf83102c8b29baeef070c697093.tar.bz2 |
drm: Rename prev_node to hole in drm_mm_scan_add_block()
Acknowledging that we were building up the hole was more useful to me
when reading the code, than knowing the relationship between this node
and the previous node.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-28-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_mm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 21bd2e13738b..459f10ca5714 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -811,7 +811,7 @@ bool drm_mm_scan_add_block(struct drm_mm_scan *scan, struct drm_mm_node *node) { struct drm_mm *mm = scan->mm; - struct drm_mm_node *prev_node; + struct drm_mm_node *hole; u64 hole_start, hole_end; u64 adj_start, adj_end; @@ -821,17 +821,17 @@ bool drm_mm_scan_add_block(struct drm_mm_scan *scan, node->scanned_block = 1; mm->scan_active++; - prev_node = list_prev_entry(node, node_list); + hole = list_prev_entry(node, node_list); - node->scanned_preceeds_hole = prev_node->hole_follows; - prev_node->hole_follows = 1; + node->scanned_preceeds_hole = hole->hole_follows; + hole->hole_follows = 1; list_del(&node->node_list); - node->node_list.prev = &prev_node->node_list; + node->node_list.prev = &hole->node_list; node->node_list.next = &scan->prev_scanned_node->node_list; scan->prev_scanned_node = node; - adj_start = hole_start = drm_mm_hole_node_start(prev_node); - adj_end = hole_end = drm_mm_hole_node_end(prev_node); + adj_start = hole_start = drm_mm_hole_node_start(hole); + adj_end = hole_end = drm_mm_hole_node_end(hole); if (scan->check_range) { if (adj_start < scan->range_start) @@ -841,7 +841,7 @@ bool drm_mm_scan_add_block(struct drm_mm_scan *scan, } if (mm->color_adjust) - mm->color_adjust(prev_node, scan->color, &adj_start, &adj_end); + mm->color_adjust(hole, scan->color, &adj_start, &adj_end); if (check_free_hole(adj_start, adj_end, scan->size, scan->alignment)) { |