summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_mm.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-12-22 11:36:05 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-12-27 14:28:44 +0300
commit2bc98c86517b08304b5008f427b751c08659b100 (patch)
tree3e0b3013d7fa0411878e42f87e7a7b252e2b5c8a /drivers/gpu/drm/drm_mm.c
parent0bfd4a01a6605849d7c282c37503292469fab0be (diff)
downloadlinux-2bc98c86517b08304b5008f427b751c08659b100.tar.xz
drm: Use drm_mm_nodes() as shorthand for the list of nodes under struct drm_mm
Fairly commonly we want to inspect the node list on the struct drm_mm, which is buried within an embedded node. Bring it to the surface with a bit of syntatic sugar. Note this was intended to be split from commit ad579002c8ec ("drm: Add drm_mm_for_each_node_safe()") before being applied, but my timing sucks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/drm_mm.c')
-rw-r--r--drivers/gpu/drm/drm_mm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 7573661302a4..4257c86cc305 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -138,7 +138,7 @@ static void show_leaks(struct drm_mm *mm)
if (!buf)
return;
- list_for_each_entry(node, __drm_mm_nodes(mm), node_list) {
+ list_for_each_entry(node, drm_mm_nodes(mm), node_list) {
struct stack_trace trace = {
.entries = entries,
.max_entries = STACKDEPTH
@@ -320,7 +320,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node)
if (hole->start < end)
return -ENOSPC;
} else {
- hole = list_entry(__drm_mm_nodes(mm), typeof(*hole), node_list);
+ hole = list_entry(drm_mm_nodes(mm), typeof(*hole), node_list);
}
hole = list_last_entry(&hole->node_list, typeof(*hole), node_list);
@@ -883,7 +883,7 @@ EXPORT_SYMBOL(drm_mm_scan_remove_block);
*/
bool drm_mm_clean(const struct drm_mm *mm)
{
- const struct list_head *head = __drm_mm_nodes(mm);
+ const struct list_head *head = drm_mm_nodes(mm);
return (head->next->next == head);
}
@@ -929,7 +929,7 @@ EXPORT_SYMBOL(drm_mm_init);
*/
void drm_mm_takedown(struct drm_mm *mm)
{
- if (WARN(!list_empty(__drm_mm_nodes(mm)),
+ if (WARN(!list_empty(drm_mm_nodes(mm)),
"Memory manager not clean during takedown.\n"))
show_leaks(mm);