drm/ras: Do not fail an error-counter dump on a skipped last ID
Subsystems (3)
Rodrigo Vivi
maintainerPATCH 1/1 drm/ras: Do not fail an error-counter dump on a skipped last ID
drm_ras_nl_get_error_counter_dumpit() skips the IDs the driver reports as -ENOENT, but keeps that value in ret. If the last ID of the range is skipped, a complete dump then fails with -ENOENT.
Fixes c36218dc49f5 ("drm/ras: Introduce the DRM RAS infrastructure over generic netlink")
Cc Zack McKevitt <[email protected]>
Cc Jeff Hugo <[email protected]>
Reviewed-by Michael J. Ruhl <[email protected]>
Signed-off-by Rodrigo Vivi <[email protected]>
--- drivers/gpu/drm/drm_ras.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_ras.c +3 -1
@@ -616,8 +616,10 @@ int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb,* For non-contiguous range, driver return -ENOENT as indication * to skip this ID when listing all errors. */ -if (ret == -ENOENT ) +if (ret == -ENOENT ) { + ret =0 ;continue ; + }if (ret)break ;
Signature · 1 line
2.56.0
Quoted 19 lines · Rodrigo Vivi
drm_ras_nl_get_error_counter_dumpit()skips the IDs the driver reports as-ENOENT, but keeps that value in ret. If the last ID of the range is skipped, a complete dump then fails with-ENOENT.Fixes c36218dc49f5 ("drm/ras: Introduce the DRM RAS infrastructure over generic netlink")Cc Zack McKevitt <[email protected]>Cc Jeff Hugo <[email protected]>Reviewed-by Michael J. Ruhl <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/drm_ras.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_ras.c +0
-0@@ -616,8 +616,10 @@ int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb,* For non-contiguous range, driver return -ENOENT as indication
drivers/gpu/drm/drm_ras.c int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb, · line 625
Quoted 10 lines
drivers/gpu/drm/drm_ras.c +3
-1* to skip this ID when listing all errors. */ -if (ret == -ENOENT ) +if (ret == -ENOENT ) { + ret =0 ;continue ; + }if (ret)break ;
Reviewed-by Zack McKevitt <[email protected]>