From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: "Nilawar, Badal" <badal.nilawar@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <riana.tauro@intel.com>,
"Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [PATCH] drm/xe: Fix static analysis tool reported errors
Date: Mon, 25 Mar 2024 19:09:40 +0530 [thread overview]
Message-ID: <9e022654-96a8-4b3a-80d3-fd3ba3a22697@intel.com> (raw)
In-Reply-To: <0e0355fc-c10e-4e65-b193-6b5858c9da87@intel.com>
This check is not needed, already xe_device_get_gt internally checks gt
for NULL.
On 25-03-2024 18:59, Nilawar, Badal wrote:
>
>
> On 25-03-2024 13:35, Karthik Poosa 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)) {
> Is this check really needed? xe_pm_ops will get installed when driver
> probe is successful and driver probe successful means root tile
> primary_gt exists.
>
> Regards,
> Badal
>> + err = -ENXIO;
>> + goto out;
>> + }
>> +
>> xe->d3cold.power_lost = xe_guc_in_reset(>->uc.guc);
>> if (xe->d3cold.allowed && xe->d3cold.power_lost) {
next prev parent reply other threads:[~2024-03-25 13:40 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 ` [PATCH] drm/xe: Fix static analysis tool reported errors Jani Nikula
2024-03-25 9:45 ` Jani Nikula
2024-03-25 12:00 ` Riana Tauro
2024-03-25 13:29 ` Nilawar, Badal
2024-03-25 13:39 ` Poosa, Karthik [this message]
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=9e022654-96a8-4b3a-80d3-fd3ba3a22697@intel.com \
--to=karthik.poosa@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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