[PATCH] drm/xe/devcoredump: Fix print typo of offset
Lucas De Marchi
lucas.demarchi at intel.com
Wed Feb 19 19:53:44 UTC 2025
On Wed, Feb 19, 2025 at 07:07:39PM +0000, Shuicheng Lin wrote:
>The log should print with "offset" instead of "size".
patch 1 ^
>
>kzalloc returns a valid pointer or NULL if the allocation fails.
>It never returns an error pointer. It is better to check for NULL directly.
patch 2 ^
and in one of them mention the typo fix.
thanks
Lucas De Marchi
>
>Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
>Cc: John Harrison <John.C.Harrison at Intel.com>
>---
> drivers/gpu/drm/xe/xe_devcoredump.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
>index 39fe485d2085..81b9d9bb3f57 100644
>--- a/drivers/gpu/drm/xe/xe_devcoredump.c
>+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
>@@ -237,7 +237,7 @@ static void xe_devcoredump_deferred_snap_work(struct work_struct *work)
>
> /*
> * NB: Despite passing a GFP_ flags parameter here, more allocations are done
>- * internally using GFP_KERNEL expliictly. Hence this call must be in the worker
>+ * internally using GFP_KERNEL explicitly. Hence this call must be in the worker
> * thread and not in the initial capture call.
> */
> dev_coredumpm_timeout(gt_to_xe(ss->gt)->drm.dev, THIS_MODULE, coredump, 0, GFP_KERNEL,
>@@ -423,11 +423,11 @@ void xe_print_blob_ascii85(struct drm_printer *p, const char *prefix, char suffi
> if (size & 3)
> drm_printf(p, "Size not word aligned: %zu", size);
> if (offset & 3)
>- drm_printf(p, "Offset not word aligned: %zu", size);
>+ drm_printf(p, "Offset not word aligned: %zu", offset);
>
> line_buff = kzalloc(DMESG_MAX_LINE_LEN, GFP_KERNEL);
>- if (IS_ERR_OR_NULL(line_buff)) {
>- drm_printf(p, "Failed to allocate line buffer: %pe", line_buff);
>+ if (!line_buff) {
>+ drm_printf(p, "Failed to allocate line buffer\n");
> return;
> }
>
>--
>2.25.1
>
More information about the Intel-xe
mailing list