From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
intel-xe@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com
Subject: Re: [PATCH] drm/xe/tlb: Init range tilemask err to zero
Date: Mon, 16 Mar 2026 17:24:17 +0100 [thread overview]
Message-ID: <2a3ee1ee37810eadea37eb9915bf3d808ebef51d.camel@linux.intel.com> (raw)
In-Reply-To: <20260316162003.64643-2-jonathan.cavitt@intel.com>
On Mon, 2026-03-16 at 16:20 +0000, Jonathan Cavitt wrote:
> Initialize err = 0 in xe_tlb_inval_range_tilemask_submit to prevent a
> possible uninitialized value return in the case where the tile_mask
> somehow doesn't match any available tile ids.
>
> This targets a static analysis issue.
>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
IIRC Claude also complained about this but concluded itself it was
a false positive.
Either way, this makes the code easier to read
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/xe/xe_tlb_inval.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_tlb_inval.c
> b/drivers/gpu/drm/xe/xe_tlb_inval.c
> index 10dcd4abb00f..bbd21d393062 100644
> --- a/drivers/gpu/drm/xe/xe_tlb_inval.c
> +++ b/drivers/gpu/drm/xe/xe_tlb_inval.c
> @@ -529,7 +529,7 @@ int xe_tlb_inval_range_tilemask_submit(struct
> xe_device *xe, u32 asid,
> struct xe_tile *tile;
> u32 fence_id = 0;
> u8 id;
> - int err;
> + int err = 0;
>
> batch->num_fences = 0;
> if (!tile_mask)
next prev parent reply other threads:[~2026-03-16 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 16:20 [PATCH] drm/xe/tlb: Init range tilemask err to zero Jonathan Cavitt
2026-03-16 16:24 ` Thomas Hellström [this message]
2026-03-16 19:17 ` ✓ CI.KUnit: success for " Patchwork
2026-03-16 19:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-17 17:46 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-08 16:18 ` Lin, Shuicheng
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=2a3ee1ee37810eadea37eb9915bf3d808ebef51d.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=alex.zuo@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=saurabhg.gupta@intel.com \
/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.