]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mm/huge_memory.c: rename shadowed local
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 16 Dec 2024 05:44:47 +0000 (21:44 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:18 +0000 (20:22 -0800)
split_huge_pages_write() has a lccal `buf' which shadows incoming arg
`buf'.  Reviewer confusion resulted.  Rename the inner local to `tok_buf'.

Cc: Leo Stone <leocstone@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index 6d87db53db336725d0803278d7082177b9a0c657..2654a95487499735b4dd93922f8a2a39edfc5261 100644 (file)
@@ -4181,20 +4181,21 @@ static ssize_t split_huge_pages_write(struct file *file, const char __user *buf,
 
        if (input_buf[0] == '/') {
                char *tok;
-               char *buf = input_buf;
+               char *tok_buf = input_buf;
                char file_path[MAX_INPUT_BUF_SZ];
                pgoff_t off_start = 0, off_end = 0;
                size_t input_len = strlen(input_buf);
 
-               tok = strsep(&buf, ",");
-               if (tok && buf) {
+               tok = strsep(&tok_buf, ",");
+               if (tok && tok_buf) {
                        strscpy(file_path, tok);
                } else {
                        ret = -EINVAL;
                        goto out;
                }
 
-               ret = sscanf(buf, "0x%lx,0x%lx,%d", &off_start, &off_end, &new_order);
+               ret = sscanf(tok_buf, "0x%lx,0x%lx,%d", &off_start,
+                           &off_end, &new_order);
                if (ret != 2 && ret != 3) {
                        ret = -EINVAL;
                        goto out;