Skip to content

Commit 1fc1065

Browse files
committed
mm/huge_memory.c: rename shadowed local
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 7e8c8fd commit 1fc1065

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mm/huge_memory.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4181,20 +4181,21 @@ static ssize_t split_huge_pages_write(struct file *file, const char __user *buf,
41814181

41824182
if (input_buf[0] == '/') {
41834183
char *tok;
4184-
char *buf = input_buf;
4184+
char *tok_buf = input_buf;
41854185
char file_path[MAX_INPUT_BUF_SZ];
41864186
pgoff_t off_start = 0, off_end = 0;
41874187
size_t input_len = strlen(input_buf);
41884188

4189-
tok = strsep(&buf, ",");
4190-
if (tok && buf) {
4189+
tok = strsep(&tok_buf, ",");
4190+
if (tok && tok_buf) {
41914191
strscpy(file_path, tok);
41924192
} else {
41934193
ret = -EINVAL;
41944194
goto out;
41954195
}
41964196

4197-
ret = sscanf(buf, "0x%lx,0x%lx,%d", &off_start, &off_end, &new_order);
4197+
ret = sscanf(tok_buf, "0x%lx,0x%lx,%d", &off_start,
4198+
&off_end, &new_order);
41984199
if (ret != 2 && ret != 3) {
41994200
ret = -EINVAL;
42004201
goto out;

0 commit comments

Comments
 (0)