diff options
author | Francois Dugast <francois.dugast@intel.com> | 2023-07-27 16:55:29 +0200 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 17:39:17 +0100 |
commit | 99fea6828879381405dba598627aea79fa6edd78 (patch) | |
tree | 1ae501df46eb3a5274eec4f4a5006eae1ddf08b9 /drivers/gpu/drm/xe/xe_gt_debugfs.c | |
parent | drm/xe/macro: Remove unused constant (diff) | |
download | linux-99fea6828879381405dba598627aea79fa6edd78.tar.xz linux-99fea6828879381405dba598627aea79fa6edd78.zip |
drm/xe: Prefer WARN() over BUG() to avoid crashing the kernel
Replace calls to XE_BUG_ON() with calls XE_WARN_ON() which in turn calls
WARN() instead of BUG(). BUG() crashes the kernel and should only be
used when it is absolutely unavoidable in case of catastrophic and
unrecoverable failures, which is not the case here.
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.c | 2 |
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 e622174a866d..b871e45af813 100644 --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c @@ -157,7 +157,7 @@ void xe_gt_debugfs_register(struct xe_gt *gt) char name[8]; int i; - XE_BUG_ON(!minor->debugfs_root); + XE_WARN_ON(!minor->debugfs_root); sprintf(name, "gt%d", gt->info.id); root = debugfs_create_dir(name, minor->debugfs_root); |