[PATCH] sh: use sizeof() in memchunk_cmdline_override
From: Thorsten Blum
Date: Thu Apr 23 2026 - 08:12:01 EST
Replace the hard-coded string length with 'sizeof("memchunk.") - 1' and
remove the comment.
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
arch/sh/mm/consistent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 0de206c1acfe..8f3a5bcbccfe 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -23,7 +23,7 @@ static void __init memchunk_cmdline_override(char *name, unsigned long *sizep)
int k = strlen(name);
while ((p = strstr(p, "memchunk."))) {
- p += 9; /* strlen("memchunk.") */
+ p += sizeof("memchunk.") - 1;
if (!strncmp(name, p, k) && p[k] == '=') {
p += k + 1;
*sizep = memparse(p, NULL);