[PATCH v1 01/11] drm/ras: Update counter helpers with counter naming

Raag Jadav
2026-04-17T21:21:15Z

Counter helpers deal with counter values. Use the appropriate naming to
match with their functionality.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/gpu/drm/drm_ras.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
index b2fa5ab86d87..1f7435d60f11 100644
--- a/drivers/gpu/drm/drm_ras.c
+++ b/drivers/gpu/drm/drm_ras.c
@@ -162,8 +162,8 @@ static int get_node_error_counter(u32 node_id, u32 error_id,
return node->query_error_counter(node, error_id, name, value);
}

-static int msg_reply_value(struct sk_buff *msg, u32 error_id,
- const char *error_name, u32 value)
+static int msg_reply_counter_value(struct sk_buff *msg, u32 error_id,
+ const char *error_name, u32 value)
{
int ret;

@@ -180,8 +180,8 @@ static int msg_reply_value(struct sk_buff *msg, u32 error_id,
value);
}

-static int doit_reply_value(struct genl_info *info, u32 node_id,
- u32 error_id)
+static int doit_reply_counter_value(struct genl_info *info, u32 node_id,
+ u32 error_id)
{
struct sk_buff *msg;
struct nlattr *hdr;
@@ -204,7 +204,7 @@ static int doit_reply_value(struct genl_info *info, u32 node_id,
if (ret)
return ret;

- ret = msg_reply_value(msg, error_id, error_name, value);
+ ret = msg_reply_counter_value(msg, error_id, error_name, value);
if (ret) {
genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
@@ -272,7 +272,7 @@ int drm_ras_nl_get_error_counter_dumpit(struct sk_buff *skb,
break;
}

- ret = msg_reply_value(skb, error_id, error_name, value);
+ ret = msg_reply_counter_value(skb, error_id, error_name, value);
if (ret) {
genlmsg_cancel(skb, hdr);
break;
@@ -311,7 +311,7 @@ int drm_ras_nl_get_error_counter_doit(struct sk_buff *skb,
node_id = nla_get_u32(info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID]);
error_id = nla_get_u32(info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID]);

- return doit_reply_value(info, node_id, error_id);
+ return doit_reply_counter_value(info, node_id, error_id);
}

/**
--
2.43.0