From: Thorsten Blum <thorsten.blum@linux.dev>
To: Rich Felker <dalias@libc.org>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sh: use sizeof() in memchunk_cmdline_override
Date: Thu, 23 Apr 2026 14:04:42 +0200 [thread overview]
Message-ID: <20260423120441.212278-3-thorsten.blum@linux.dev> (raw)
Replace the hard-coded string length with 'sizeof("memchunk.") - 1' and
remove the comment.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
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);
next reply other threads:[~2026-04-23 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 12:04 Thorsten Blum [this message]
2026-04-24 11:05 ` [PATCH] sh: use sizeof() in memchunk_cmdline_override Geert Uytterhoeven
2026-04-24 11:15 ` Thorsten Blum
2026-04-24 17:10 ` Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260423120441.212278-3-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.