public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Tauro, Riana" <riana.tauro@intel.com>
To: "Lin, Shuicheng" <shuicheng.lin@intel.com>,
	"Nguyen, Brian3" <brian3.nguyen@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/ras: Clean up coding style in xe_drm_ras
Date: Tue, 14 Apr 2026 10:03:01 +0530	[thread overview]
Message-ID: <91da4b75-0f61-469c-9231-fe632325f64e@intel.com> (raw)
In-Reply-To: <DM4PR11MB5456D44F0891F8E46BE9827DEA252@DM4PR11MB5456.namprd11.prod.outlook.com>


On 4/14/2026 5:57 AM, Lin, Shuicheng wrote:
> On Sun, Apr 12, 2026 9:46 PM Riana Tauro wrote:
>> On 4/11/2026 10:24 AM, Nguyen, Brian3 wrote:
>>> On Tuesday, April 7, 2026 3:59 PM, Shuicheng Lin wrote:
>>>> - Fix long line in cleanup_node_param() signature.
>> All checkpatch errors were fixed in the original series.  The line length is in-line
>> with checkpatch.
>> Please provide the checkpatch error if you are seeing.
> Here it is:
> $ ./scripts/checkpatch.pl --strict drivers/gpu/drm/xe/xe_drm_ras.c
> CHECK: line length of 101 exceeds 100 columns
> #103: FILE: drivers/gpu/drm/xe/xe_drm_ras.c:103:
> +static void cleanup_node_param(struct xe_drm_ras *ras, const enum drm_xe_ras_error_severity severity)
If you are re-working the first patch add it as part of the same.

Thanks
Riana

>
>>>> - Drop unnecessary const on pass-by-value enum parameters.
>> This can be added as part of any other functional series. A patch just for this is
>> not necessary.
> I am OK with it.
>
>>>> - Simplify xe_drm_ras_init() by removing redundant local variable
>>>>     and redundant error path.
>> Any reason?
> This is just code refine. If you don't agree with it, I won't insist on it.
> Since you will have new series, I will drop both patches, and feel free to integrate any change that you think worth.
> Thanks.
>
> Shuicheng
>
>> Thanks
>> Riana
>>>> No functional change.
>>>>
>>>> Cc: Riana Tauro <riana.tauro@intel.com>
>>>> Assisted-by: Claude:claude-opus-4.6
>>>> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
>>> Reviewed-by: Brian Nguyen <brian3.nguyen@intel.com>
>>>
>>>> ---
>>>>    drivers/gpu/drm/xe/xe_drm_ras.c | 19 ++++++++-----------
>>>>    1 file changed, 8 insertions(+), 11 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_drm_ras.c
>>>> b/drivers/gpu/drm/xe/xe_drm_ras.c index 802e4bcb731c..9cddad2be549
>>>> 100644
>>>> --- a/drivers/gpu/drm/xe/xe_drm_ras.c
>>>> +++ b/drivers/gpu/drm/xe/xe_drm_ras.c
>>>> @@ -68,7 +68,7 @@ static struct xe_drm_ras_counter
>> *allocate_and_copy_counters(struct xe_device *x
>>>>    }
>>>>
>>>>    static int assign_node_params(struct xe_device *xe, struct drm_ras_node
>> *node,
>>>> -			      const enum drm_xe_ras_error_severity severity)
>>>> +			      enum drm_xe_ras_error_severity severity)
>>>>    {
>>>>    	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
>>>>    	struct xe_drm_ras *ras = &xe->ras; @@ -109,7 +109,8 @@ static int
>>>> assign_node_params(struct xe_device *xe, struct drm_ras_node *node,
>>>>    	return ret;
>>>>    }
>>>>
>>>> -static void cleanup_node_param(struct xe_drm_ras *ras, const enum
>>>> drm_xe_ras_error_severity severity)
>>>> +static void cleanup_node_param(struct xe_drm_ras *ras,
>>>> +			       enum drm_xe_ras_error_severity severity)
>>>>    {
>>>>    	struct drm_ras_node *node = &ras->node[severity];
>>>>
>>>> @@ -174,15 +175,13 @@ static void xe_drm_ras_unregister_nodes(struct
>> drm_device *device, void *arg)
>>>>    int xe_drm_ras_init(struct xe_device *xe)
>>>>    {
>>>>    	struct xe_drm_ras *ras = &xe->ras;
>>>> -	struct drm_ras_node *node;
>>>>    	int err;
>>>>
>>>> -	node = drmm_kcalloc(&xe->drm, DRM_XE_RAS_ERR_SEV_MAX,
>> sizeof(*node), GFP_KERNEL);
>>>> -	if (!node)
>>>> +	ras->node = drmm_kcalloc(&xe->drm, DRM_XE_RAS_ERR_SEV_MAX,
>>>> +				 sizeof(*ras->node), GFP_KERNEL);
>>>> +	if (!ras->node)
>>>>    		return -ENOMEM;
>>>>
>>>> -	ras->node = node;
>>>> -
>>>>    	err = register_nodes(xe);
>>>>    	if (err) {
>>>>    		drm_err(&xe->drm, "Failed to register DRM RAS nodes
>> (%pe)\n",
>>>> ERR_PTR(err)); @@ -190,10 +189,8 @@ int xe_drm_ras_init(struct
>> xe_device *xe)
>>>>    	}
>>>>
>>>>    	err = drmm_add_action_or_reset(&xe->drm,
>> xe_drm_ras_unregister_nodes, xe);
>>>> -	if (err) {
>>>> +	if (err)
>>>>    		drm_err(&xe->drm, "Failed to add action for Xe DRM RAS
>> (%pe)\n", ERR_PTR(err));
>>>> -		return err;
>>>> -	}
>>>>
>>>> -	return 0;
>>>> +	return err;
>>>>    }
>>>> --
>>>> 2.43.0

  reply	other threads:[~2026-04-14  4:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 22:59 [PATCH 0/2] drm/xe/ras: Fix and clean up xe_drm_ras Shuicheng Lin
2026-04-07 22:59 ` [PATCH 1/2] drm/xe/ras: Fix error handling in register_nodes() Shuicheng Lin
2026-04-11  4:46   ` Nguyen, Brian3
2026-04-13  4:39     ` Tauro, Riana
2026-04-14  0:15       ` Lin, Shuicheng
2026-04-14  4:27         ` Tauro, Riana
2026-04-11  7:56   ` Raag Jadav
2026-04-14  0:30     ` Lin, Shuicheng
2026-04-14  4:30       ` Tauro, Riana
2026-04-07 22:59 ` [PATCH 2/2] drm/xe/ras: Clean up coding style in xe_drm_ras Shuicheng Lin
2026-04-11  4:54   ` Nguyen, Brian3
2026-04-13  4:46     ` Tauro, Riana
2026-04-14  0:27       ` Lin, Shuicheng
2026-04-14  4:33         ` Tauro, Riana [this message]
2026-04-11  7:58   ` Raag Jadav
2026-04-07 23:09 ` ✗ CI.checkpatch: warning for drm/xe/ras: Fix and clean up xe_drm_ras Patchwork
2026-04-07 23:10 ` ✗ CI.KUnit: failure " Patchwork
2026-04-10  3:55 ` ✗ CI.checkpatch: warning for drm/xe/ras: Fix and clean up xe_drm_ras (rev2) Patchwork
2026-04-10  3:56 ` ✓ CI.KUnit: success " Patchwork
2026-04-10  4:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-10 10:41 ` ✗ Xe.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=91da4b75-0f61-469c-9231-fe632325f64e@intel.com \
    --to=riana.tauro@intel.com \
    --cc=brian3.nguyen@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=shuicheng.lin@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