All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jonathan Cavitt" <jonathan.cavitt@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 1/2] drm/xe/pagefault: Add SRCID to pagefault struct
Date: Thu, 18 Jun 2026 15:45:05 +0000	[thread overview]
Message-ID: <20260618154505.9103D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260618153312.877948-2-jonathan.cavitt@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The format specifier `%ld` is incorrectly used for an `unsigned long` value.
--

commit 18f63f8d431959e86df8128bf9d2756c13aca8e3
Author: Jonathan Cavitt <jonathan.cavitt@intel.com>

drm/xe/pagefault: Add SRCID to pagefault struct

This commit adds SRCID information to the pagefault struct to report the
hardware unit that resulted in the pagefault. It squashes the SRCID with the
ASID to keep the struct compact.

> diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
> index dd3c068e1a399..2a21203b1a2a0 100644
> --- a/drivers/gpu/drm/xe/xe_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_pagefault.c
[ ... ]
> @@ -242,14 +243,16 @@ static bool xe_pagefault_queue_pop(struct xe_pagefault_queue *pf_queue,
>  
>  static void xe_pagefault_print(struct xe_pagefault *pf)
>  {
> -	xe_gt_info(pf->gt, "\n\tASID: %d\n"
> +	xe_gt_info(pf->gt, "\n\tASID: %ld\n"

[Severity: Low]
Should this format specifier be %lu instead of %ld?

In xe_pagefault_print(), the ASID value is now extracted using
FIELD_GET(XE_PAGEFAULT_ASID_MASK, pf->consumer.id). Because 
XE_PAGEFAULT_ASID_MASK is constructed using GENMASK(), the FIELD_GET() macro
evaluates to an unsigned long. 

Passing an unsigned long to %ld causes a format string type mismatch. While
the 24-bit positive ASID value will format without memory corruption at 
runtime, %lu is the correct format specifier for unsigned long values.

>  		   "\tFaulted Address: 0x%08x%08x\n"
>  		   "\tFaultType: %lu\n"
>  		   "\tAccessType: %lu\n"
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260618153312.877948-1-jonathan.cavitt@intel.com?part=1

  reply	other threads:[~2026-06-18 15:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 15:33 [PATCH v4 0/2] drm/xe/pagefault: Add SRCID to pagefault reporting Jonathan Cavitt
2026-06-18 15:33 ` [PATCH v4 1/2] drm/xe/pagefault: Add SRCID to pagefault struct Jonathan Cavitt
2026-06-18 15:45   ` sashiko-bot [this message]
2026-06-18 15:33 ` [PATCH v4 2/2] drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report Jonathan Cavitt
2026-06-18 15:40 ` ✓ CI.KUnit: success for drm/xe/pagefault: Add SRCID to pagefault reporting (rev4) Patchwork
2026-06-18 16:31 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-18 23:40 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260618154505.9103D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.