Re: [PATCH v4 21/32] drm/xe/survivability: Report 'sysfs failure' error using SIGID

"Tauro, Riana" <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe
Message-ID <[email protected]>
On 13-08-2026 00:44, Michal Wajdeczko wrote:
> Report 'failed to create sysfs files' error using xe_log_err() helper
> from all sysfs failure points and for all call sites.

Is SIGID appropriate here? My understanding is that SIGIDs are meant for 
failures requiring corrective
action either from driver itself or external.
A sysfs creation failure is a internal issue and may not belong in that 
category.

Thanks
Riana

>
> Signed-off-by: Michal Wajdeczko <[email protected]>
> Cc: Rodrigo Vivi <[email protected]>
> Cc: Riana Tauro <[email protected]>
> Cc: Aravind Iddamsetty <[email protected]>
> Cc: Mallesh Koujalagi <[email protected]>
> ---
>   drivers/gpu/drm/xe/xe_survivability_mode.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
> index 85b4c125a217..2d8c532157fd 100644
> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
> @@ -280,24 +280,26 @@ static int create_survivability_sysfs(struct pci_dev *pdev)
>   	int ret;
>   
>   	ret = device_create_file(dev, &dev_attr_survivability_mode);
> -	if (ret) {
> -		dev_warn(dev, "Failed to create survivability sysfs files\n");
> -		return ret;
> -	}
> +	if (ret)
> +		goto failed;
>   
>   	ret = devm_add_action_or_reset(xe->drm.dev,
>   				       xe_survivability_mode_fini, xe);
>   	if (ret)
> -		return ret;
> +		goto failed;
>   
>   	/* Survivability info is not required if enabled via configfs */
>   	if (!xe_configfs_get_survivability_mode(pdev)) {
>   		ret = devm_device_add_group(dev, &survivability_info_group);
>   		if (ret)
> -			return ret;
> +			goto failed;
>   	}
>   
>   	return 0;
> +
> +failed:
> +	xe_log_err(xe, SURVIVABILITY, ret, "Failed to create sysfs files!\n");
> +	return ret;
>   }
>   
>   static int enable_boot_survivability_mode(struct pci_dev *pdev)
> @@ -403,9 +405,7 @@ void xe_survivability_mode_runtime_enable(struct xe_device *xe)
>   	}
>   
>   	populate_survivability_info(xe);
> -
> -	if (create_survivability_sysfs(pdev))
> -		dev_err(&pdev->dev, "Failed to create survivability sysfs\n");
> +	create_survivability_sysfs(pdev);
>   
>   	survivability->type = XE_SURVIVABILITY_TYPE_RUNTIME;
>   	dev_err(&pdev->dev, "Runtime Survivability mode enabled\n");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.