Re: [RFC PATCH 01/77] checks: Use consistent type for strspn() returned value
From: Ayush Singh <hidden>
Date: 2026-01-12 14:55:17
Also in:
lkml
From: Ayush Singh <hidden>
Date: 2026-01-12 14:55:17
Also in:
lkml
On 1/12/26 7:48 PM, Herve Codina wrote:
strspn() returns a size_t value. The function is called in several places and in all places this value is stored in a size_t variable except in check_node_name_chars_strict(). Fix the variable type used in check_node_name_chars_strict(). Signed-off-by: Herve Codina <herve.codina@bootlin.com> --- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/checks.c b/checks.c index 5d09216..041e565 100644 --- a/checks.c +++ b/checks.c@@ -324,7 +324,7 @@ ERROR(node_name_chars, check_node_name_chars, NODECHARS); static void check_node_name_chars_strict(struct check *c, struct dt_info *dti, struct node *node) { - int n = strspn(node->name, c->data); + size_t n = strspn(node->name, c->data); if (n < node->basenamelen) FAIL(c, dti, node, "Character '%c' not recommended in node name",
Reviewed-by: Ayush Singh <redacted>