Re: [PATCH v1] drm/xe/ras: Fix invalid health error code
"Tauro, Riana" <[email protected]> Tue, 4 Aug 2026 12:06:47 +0530
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
On 04-08-2026 10:42, Raag Jadav wrote:
> We use -EBADMSG for corrupted responses from sysctrl. Fix the error code.
Let's keep it -EIO as it's more appropriate for sysctrl errors and
consistent than
#define EBADMSG 74 /* Not a data message */
Thanks
Riana
>
> Fixes: 53a7115f9862 ("drm/xe/xe_ras: Add RAS GPU health indicator")
> Signed-off-by: Raag Jadav <[email protected]>
> ---
> drivers/gpu/drm/xe/xe_ras.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index f7af4da8172c..bdad0621ae12 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -700,7 +700,7 @@ static ssize_t gpu_health_show(struct device *dev, struct device_attribute *attr
> if (response.health >= XE_RAS_HEALTH_MAX) {
> xe_err(xe, "sysctrl: invalid health state %u\n",
> response.health);
> - return -EIO;
> + return -EBADMSG;
> }
>
> health = gpu_health_states[response.health];
> @@ -753,7 +753,7 @@ static ssize_t gpu_health_store(struct device *dev, struct device_attribute *att
> if (response.health >= XE_RAS_HEALTH_MAX) {
> xe_err(xe, "sysctrl: invalid health state %u\n",
> response.health);
> - return -EIO;
> + return -EBADMSG;
> }
>
> health = gpu_health_states[response.health];