summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_res_cursor.h
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-07-19 16:51:08 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:37:52 +0300
commit72e8d73b712d2232019b33d2331099d3071ea94a (patch)
tree1680307d4c2b0c2f5bfee524c87426b150e3d9f1 /drivers/gpu/drm/xe/xe_res_cursor.h
parentea82d5aab53f8f13fa0834d0b4341ca0788c2a8f (diff)
downloadlinux-72e8d73b712d2232019b33d2331099d3071ea94a.tar.xz
drm/xe: Cleanup style warnings and errors
Fix 6 errors and 20 warnings reported by checkpatch.pl. Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_res_cursor.h')
-rw-r--r--drivers/gpu/drm/xe/xe_res_cursor.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_res_cursor.h b/drivers/gpu/drm/xe/xe_res_cursor.h
index 2a6fdd284395..dda963fe3300 100644
--- a/drivers/gpu/drm/xe/xe_res_cursor.h
+++ b/drivers/gpu/drm/xe/xe_res_cursor.h
@@ -51,15 +51,14 @@ struct xe_res_cursor {
static struct drm_buddy *xe_res_get_buddy(struct ttm_resource *res)
{
struct xe_device *xe = ttm_to_xe_device(res->bo->bdev);
+ struct ttm_resource_manager *mgr;
- if (res->mem_type != XE_PL_STOLEN) {
+ if (res->mem_type != XE_PL_STOLEN)
return &xe->tiles[res->mem_type - XE_PL_VRAM0].mem.vram_mgr->mm;
- } else {
- struct ttm_resource_manager *mgr =
- ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
- return &to_xe_ttm_vram_mgr(mgr)->mm;
- }
+ mgr = ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
+
+ return &to_xe_ttm_vram_mgr(mgr)->mm;
}
/**