From: Jani Nikula <jani.nikula@linux.intel.com>
To: Karthik Poosa <karthik.poosa@intel.com>, intel-xe@lists.freedesktop.org
Cc: anshuman.gupta@intel.com, badal.nilawar@intel.com,
riana.tauro@intel.com, Karthik Poosa <karthik.poosa@intel.com>
Subject: Re: [PATCH] drm/xe: Fix static analysis tool reported errors
Date: Mon, 25 Mar 2024 11:44:21 +0200 [thread overview]
Message-ID: <87h6guk5my.fsf@intel.com> (raw)
In-Reply-To: <20240325080550.3217836-1-karthik.poosa@intel.com>
The subject should describe the change, not the tool.
We're not interested in the tool, we're interested in the change, and
why it's being made. And the reason why is also not the tool, but the
actual reason the NULL check should be done.
BR,
Jani.
On Mon, 25 Mar 2024, Karthik Poosa <karthik.poosa@intel.com> wrote:
> Add a NULL pointer check.
>
> v2: Release resources before returning error. (Riana)
>
> v3: Update commit message. (Badal)
>
> v4: Change drm_err to XE_WARN_ON. (Anshuman)
>
> v5: Fix XE_WARN_ON check. (Riana)
>
> Fixes: 09d88e3beb64 ("drm/xe/pm: Init pcode and restore vram on power lost")
> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index cc650a92c2fc..f6837bd6f9a3 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -383,6 +383,11 @@ int xe_pm_runtime_resume(struct xe_device *xe)
> * really lost power. Detecting primary Gt power is sufficient.
> */
> gt = xe_device_get_gt(xe, 0);
> + if (XE_WARN_ON(!gt)) {
> + err = -ENXIO;
> + goto out;
> + }
> +
> xe->d3cold.power_lost = xe_guc_in_reset(>->uc.guc);
>
> if (xe->d3cold.allowed && xe->d3cold.power_lost) {
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-03-25 9:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 8:05 [PATCH] drm/xe: Fix static analysis tool reported errors Karthik Poosa
2024-03-25 8:01 ` ✓ CI.Patch_applied: success for drm/xe: Fix static analysis tool reported errors (rev5) Patchwork
2024-03-25 8:01 ` ✓ CI.checkpatch: " Patchwork
2024-03-25 8:02 ` ✓ CI.KUnit: " Patchwork
2024-03-25 8:27 ` ✓ CI.Build: " Patchwork
2024-03-25 8:30 ` ✓ CI.Hooks: " Patchwork
2024-03-25 8:31 ` ✓ CI.checksparse: " Patchwork
2024-03-25 8:56 ` ✓ CI.BAT: " Patchwork
2024-03-25 9:44 ` Jani Nikula [this message]
2024-03-25 9:45 ` [PATCH] drm/xe: Fix static analysis tool reported errors Jani Nikula
2024-03-25 12:00 ` Riana Tauro
2024-03-25 13:29 ` Nilawar, Badal
2024-03-25 13:39 ` Poosa, Karthik
2024-03-25 13:55 ` Poosa, Karthik
-- strict thread matches above, loose matches on Subject: below --
2024-03-25 3:53 Karthik Poosa
2024-03-25 6:18 ` Riana Tauro
2024-03-23 12:13 Karthik Poosa
2024-03-23 10:53 Karthik Poosa
2024-03-24 4:00 ` Gupta, Anshuman
2024-03-23 4:48 Karthik Poosa
2024-03-23 5:07 ` Nilawar, Badal
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=87h6guk5my.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--cc=riana.tauro@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox