Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Raag Jadav" <raag.jadav@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v10 7/9] drm/xe/amc: Guard xe_amc_work() with runtime PM
Date: Fri, 16 Oct 2026 07:36:10 +0000	[thread overview]
Message-ID: <sashiko-outbox-173941@kernel.org> (raw)
In-Reply-To: <20261016072623.457392-8-raag.jadav@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] cleanup: Mixing goto-based error handling with guard() cleanup
- [Low] build: undeclared identifier 'xe' in xe_amc_work()
--

commit 151af4bf3e553f2ab553af055075b9c228711e6e
Author: Raag Jadav <raag.jadav@intel.com>

drm/xe/amc: Guard xe_amc_work() with runtime PM

This commit adds a runtime PM guard to xe_amc_work() to ensure a runtime
PM reference is held for xe_device_declare_wedged() callers.

> diff --git a/drivers/gpu/drm/xe/xe_amc.c b/drivers/gpu/drm/xe/xe_amc.c
> index 9459c63bc3ca2..662aec6c86a72 100644
> --- a/drivers/gpu/drm/xe/xe_amc.c
> +++ b/drivers/gpu/drm/xe/xe_amc.c
> @@ -113,6 +113,8 @@ static void xe_amc_work(struct work_struct *work)
>  	struct i2c_client *client;
>  	int ret;
>  
> +	guard(xe_pm_runtime)(xe);

[Severity: Low]
Is the variable xe declared in this scope? It looks like this introduces
a compilation failure because xe is passed to the guard macro without being
defined anywhere within xe_amc_work().

[Severity: Medium]
According to the cleanup subsystem guidelines, is it acceptable to mix
goto-based error handling and scope-based cleanup in the same function?

The newly added guard is placed in a function that still uses traditional
goto-based error handling on failure paths, as seen directly below.
Mixing these paradigms creates confusing ownership semantics that can lead
to resource leaks or double-free bugs during future refactoring.

> +
>  	client = amc->i2c->client[XE_I2C_CLIENT_AMC];
>  	if (IS_ERR_OR_NULL(client))
>  		goto out_reassert_interrupt;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016072623.457392-1-raag.jadav@intel.com?part=7

  reply	other threads:[~2026-10-16  7:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  7:25 [PATCH v10 0/9] Introduce xe_wedge Raag Jadav
2026-10-16  7:25 ` [PATCH v10 1/9] drm/xe/gt: Use GT ordered workqueue for wedging Raag Jadav
2026-10-16  7:50   ` sashiko-bot
2026-10-16  7:25 ` [PATCH v10 2/9] drm/xe: Drop xe_device_set_wedged_method() Raag Jadav
2026-10-16  7:25 ` [PATCH v10 3/9] drm/xe/hw_error: Guard csc_hw_error_work() with runtime PM Raag Jadav
2026-10-16  7:43   ` sashiko-bot
2026-10-16  7:25 ` [PATCH v10 4/9] drm/xe: Move xe_device_wedged_fini() registration to xe_device_probe_early() Raag Jadav
2026-10-16  7:25 ` [PATCH v10 5/9] drm/xe: Make xe_device_declare_wedged() IRQ safe Raag Jadav
2026-10-16  7:26 ` [PATCH v10 6/9] drm/xe/pci_error: Flush GT wedge worker before bus reset Raag Jadav
2026-10-16  7:44   ` sashiko-bot
2026-10-16  7:26 ` [PATCH v10 7/9] drm/xe/amc: Guard xe_amc_work() with runtime PM Raag Jadav
2026-10-16  7:36   ` sashiko-bot [this message]
2026-10-16  7:26 ` [PATCH v10 8/9] drm/xe: Introduce xe_wedge Raag Jadav
2026-10-16  7:34   ` sashiko-bot
2026-10-16  7:26 ` [PATCH v10 9/9] drm/xe/ras: Move xe_ras_process_errors() to xe_ras Raag Jadav
2026-10-16  7:52   ` sashiko-bot
2026-10-16  8:05 ` ✗ CI.checkpatch: warning for Introduce xe_wedge (rev9) Patchwork
2026-10-16  8:06 ` ✗ CI.KUnit: failure " 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=sashiko-outbox-173941@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=raag.jadav@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox