diff options
author | Francois Dugast <francois.dugast@intel.com> | 2023-07-27 14:55:29 +0000 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:39:17 -0500 |
commit | 99fea6828879381405dba598627aea79fa6edd78 (patch) | |
tree | 1ae501df46eb3a5274eec4f4a5006eae1ddf08b9 /drivers/gpu/drm/xe/xe_guc_log.c | |
parent | 3207a32163cdf7b3345a44e255aae614859ea0d6 (diff) | |
download | lwn-99fea6828879381405dba598627aea79fa6edd78.tar.gz lwn-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_guc_log.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc_log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c index 403aaafcaba6..63904007af0a 100644 --- a/drivers/gpu/drm/xe/xe_guc_log.c +++ b/drivers/gpu/drm/xe/xe_guc_log.c @@ -55,12 +55,12 @@ void xe_guc_log_print(struct xe_guc_log *log, struct drm_printer *p) size_t size; int i, j; - XE_BUG_ON(!log->bo); + XE_WARN_ON(!log->bo); size = log->bo->size; #define DW_PER_READ 128 - XE_BUG_ON(size % (DW_PER_READ * sizeof(u32))); + XE_WARN_ON(size % (DW_PER_READ * sizeof(u32))); for (i = 0; i < size / sizeof(u32); i += DW_PER_READ) { u32 read[DW_PER_READ]; |