Skip to content

Commit 26e293f

Browse files
Xunopbrauner
authored andcommitted
init: remove unused names parameter in split_fs_names()
The split_fs_names() function takes a names parameter, but the function actually uses the root_fs_names global variable instead. This names parameter is not used in the function, so it can be safely removed. This change does not affect the functionality of split_fs_names() or any other part of the kernel. Signed-off-by: Yihuan Pan <xun794@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Message-Id: <4lsiigvaw4lxcs37rlhgepv77xyxym6krkqcpc3xfncnswok3y@b67z3b44orar> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 820eb59 commit 26e293f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

init/do_mounts.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ __setup("rootfstype=", fs_names_setup);
338338
__setup("rootdelay=", root_delay_setup);
339339

340340
/* This can return zero length strings. Caller should check */
341-
static int __init split_fs_names(char *page, size_t size, char *names)
341+
static int __init split_fs_names(char *page, size_t size)
342342
{
343343
int count = 1;
344344
char *p = page;
@@ -402,7 +402,7 @@ void __init mount_block_root(char *name, int flags)
402402
scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)",
403403
MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
404404
if (root_fs_names)
405-
num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
405+
num_fs = split_fs_names(fs_names, PAGE_SIZE);
406406
else
407407
num_fs = list_bdev_fs_names(fs_names, PAGE_SIZE);
408408
retry:
@@ -545,7 +545,7 @@ static int __init mount_nodev_root(void)
545545
fs_names = (void *)__get_free_page(GFP_KERNEL);
546546
if (!fs_names)
547547
return -EINVAL;
548-
num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
548+
num_fs = split_fs_names(fs_names, PAGE_SIZE);
549549

550550
for (i = 0, fstype = fs_names; i < num_fs;
551551
i++, fstype += strlen(fstype) + 1) {

0 commit comments

Comments
 (0)