Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Subject: Re: [PATCH v3 3/7] drm/xe: Incase of action add failure, free_gsc_pkt only once
Date: Fri, 12 Apr 2024 21:08:08 +0530	[thread overview]
Message-ID: <7414208c-06e9-4136-9f25-53b717224c03@intel.com> (raw)
In-Reply-To: <4sgzyhtdho2d4ubjmbi3iuyu4qwdchycpr5vttayjlxxeu6crs@c6u4w7d5v6ha>


On 12-04-2024 18:44, Lucas De Marchi wrote:
> Same comment for commit title as in previous patch. Otherwise lgtm.
>
>     Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Thanks for the review. Will fix commit in next version.
>
> Lucas De Marchi
>
> On Fri, Apr 12, 2024 at 01:32:41PM +0530, Himal Prasad Ghimiray wrote:
>> The drmm_add_action_or_reset function automatically invokes the
>> action (free_gsc_pkt) in the event of a failure; therefore, there's no
>> necessity to call it within the return check.
>>
>> Fixes: d8b1571312b7 ("drm/xe/huc: HuC authentication via GSC")
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_huc.c | 9 +--------
>> 1 file changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_huc.c b/drivers/gpu/drm/xe/xe_huc.c
>> index 78318d73e4cf..39a484a57585 100644
>> --- a/drivers/gpu/drm/xe/xe_huc.c
>> +++ b/drivers/gpu/drm/xe/xe_huc.c
>> @@ -53,7 +53,6 @@ static int huc_alloc_gsc_pkt(struct xe_huc *huc)
>>     struct xe_gt *gt = huc_to_gt(huc);
>>     struct xe_device *xe = gt_to_xe(gt);
>>     struct xe_bo *bo;
>> -    int err;
>>
>>     /* we use a single object for both input and output */
>>     bo = xe_bo_create_pin_map(xe, gt_to_tile(gt), NULL,
>> @@ -66,13 +65,7 @@ static int huc_alloc_gsc_pkt(struct xe_huc *huc)
>>
>>     huc->gsc_pkt = bo;
>>
>> -    err = drmm_add_action_or_reset(&xe->drm, free_gsc_pkt, huc);
>> -    if (err) {
>> -        free_gsc_pkt(&xe->drm, huc);
>> -        return err;
>> -    }
>> -
>> -    return 0;
>> +    return drmm_add_action_or_reset(&xe->drm, free_gsc_pkt, huc);
>> }
>>
>> int xe_huc_init(struct xe_huc *huc)
>> -- 
>> 2.25.1
>>

  reply	other threads:[~2024-04-12 15:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12  8:02 [PATCH 0/4] Cleanup and fixes in drmm_add_action_or_reset usage Himal Prasad Ghimiray
2024-04-12  8:02 ` [PATCH v3 1/7] drm/xe: Simplify function return using drmm_add_action_or_reset() Himal Prasad Ghimiray
2024-04-12 12:52   ` Lucas De Marchi
2024-04-12 14:54     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 2/7] drm/xe: Incase of action add failure, remove sysfs only once Himal Prasad Ghimiray
2024-04-12 13:09   ` Lucas De Marchi
2024-04-12 13:13   ` Lucas De Marchi
2024-04-12 14:41     ` Jani Nikula
2024-04-12 14:55       ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 3/7] drm/xe: Incase of action add failure, free_gsc_pkt " Himal Prasad Ghimiray
2024-04-12 13:14   ` Lucas De Marchi
2024-04-12 15:38     ` Ghimiray, Himal Prasad [this message]
2024-04-12  8:02 ` [PATCH v3 4/7] drm/xe: Return NULL incase of drmm_add_action_or_reset failure Himal Prasad Ghimiray
2024-04-12  8:02 ` [PATCH v3 5/7] drm/xe/gt: Abort driver load for sysfs creation failure Himal Prasad Ghimiray
2024-04-12 13:30   ` Lucas De Marchi
2024-04-12 15:38     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 6/7] drm/xe/tile: " Himal Prasad Ghimiray
2024-04-12 13:32   ` Lucas De Marchi
2024-04-12 15:39     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 7/7] drm/xe/pm: Capture errors and handle them Himal Prasad Ghimiray
2024-04-12 13:42   ` Lucas De Marchi
2024-04-12 16:31     ` Ghimiray, Himal Prasad
2024-04-12 16:58       ` Lucas De Marchi
2024-04-12 17:07         ` Ghimiray, Himal Prasad
2024-04-12  8:15 ` ✓ CI.Patch_applied: success for Cleanup and fixes in drmm_add_action_or_reset usage (rev3) Patchwork
2024-04-12  8:15 ` ✓ CI.checkpatch: " Patchwork
2024-04-12  8:17 ` ✓ CI.KUnit: " Patchwork
2024-04-12  8:31 ` ✓ CI.Build: " Patchwork
2024-04-12  8:34 ` ✓ CI.Hooks: " Patchwork
2024-04-12  8:35 ` ✓ CI.checksparse: " Patchwork
2024-04-12  8:58 ` ✓ CI.BAT: " Patchwork
2024-04-12 12:13 ` ✗ CI.FULL: 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=7414208c-06e9-4136-9f25-53b717224c03@intel.com \
    --to=himal.prasad.ghimiray@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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