summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/xe/xe_gt_debugfs.c
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-09-12 10:36:35 +0200
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 17:41:08 +0100
commitc73acc1eeba5e380a367087cb7b933b946613ee7 (patch)
tree7f4df12ec4221d5ffefc92fbbbb813d5874f7c96 /drivers/gpu/drm/xe/xe_gt_debugfs.c
parentdrm/xe: Introduce Xe assert macros (diff)
downloadlinux-c73acc1eeba5e380a367087cb7b933b946613ee7.tar.xz
linux-c73acc1eeba5e380a367087cb7b933b946613ee7.zip
drm/xe: Use Xe assert macros instead of XE_WARN_ON macro
The XE_WARN_ON macro maps to WARN_ON which is not justified in many cases where only a simple debug check is needed. Replace the use of the XE_WARN_ON macro with the new xe_assert macros which relies on drm_*. This takes a struct drm_device argument, which is one of the main changes in this commit. The other main change is that the condition is reversed, as with XE_WARN_ON a message is displayed if the condition is true, whereas with xe_assert it is if the condition is false. v2: - Rebase - Keep WARN splats in xe_wopcm.c (Matt Roper) v3: - Rebase 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_gt_debugfs.c')
-rw-r--r--drivers/gpu/drm/xe/xe_gt_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index 9229fd5b01cc..ec1ae00f6bfc 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -158,7 +158,7 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
char name[8];
int i;
- XE_WARN_ON(!minor->debugfs_root);
+ xe_gt_assert(gt, minor->debugfs_root);
sprintf(name, "gt%d", gt->info.id);
root = debugfs_create_dir(name, minor->debugfs_root);