linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] init: remove unused names parameter in split_fs_names()
@ 2023-05-20  7:23 Yihuan Pan
  2023-05-20  7:34 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yihuan Pan @ 2023-05-20  7:23 UTC (permalink / raw)
  To: viro, linux-fsdevel; +Cc: vgoyal, hch

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>
---
 init/do_mounts.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 811e94daf0a8..d67efddf8597 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -338,7 +338,7 @@ __setup("rootfstype=", fs_names_setup);
 __setup("rootdelay=", root_delay_setup);
 
 /* This can return zero length strings. Caller should check */
-static int __init split_fs_names(char *page, size_t size, char *names)
+static int __init split_fs_names(char *page, size_t size)
 {
 	int count = 1;
 	char *p = page;
@@ -402,7 +402,7 @@ void __init mount_block_root(char *name, int flags)
 	scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)",
 		  MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
 	if (root_fs_names)
-		num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
+		num_fs = split_fs_names(fs_names, PAGE_SIZE);
 	else
 		num_fs = list_bdev_fs_names(fs_names, PAGE_SIZE);
 retry:
@@ -545,7 +545,7 @@ static int __init mount_nodev_root(void)
 	fs_names = (void *)__get_free_page(GFP_KERNEL);
 	if (!fs_names)
 		return -EINVAL;
-	num_fs = split_fs_names(fs_names, PAGE_SIZE, root_fs_names);
+	num_fs = split_fs_names(fs_names, PAGE_SIZE);
 
 	for (i = 0, fstype = fs_names; i < num_fs;
 	     i++, fstype += strlen(fstype) + 1) {
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] init: remove unused names parameter in split_fs_names()
  2023-05-20  7:23 [PATCH] init: remove unused names parameter in split_fs_names() Yihuan Pan
@ 2023-05-20  7:34 ` Christoph Hellwig
  2023-05-25  9:27 ` Christoph Hellwig
  2023-06-05  8:48 ` Christian Brauner
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2023-05-20  7:34 UTC (permalink / raw)
  To: Yihuan Pan; +Cc: viro, linux-fsdevel, vgoyal, hch

On Sat, May 20, 2023 at 03:23:32PM +0800, Yihuan Pan wrote:
> 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.

Way too long line here.

But I actually have a major rework of this code pending, so let's
please keep off from touching it for now.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init: remove unused names parameter in split_fs_names()
  2023-05-20  7:23 [PATCH] init: remove unused names parameter in split_fs_names() Yihuan Pan
  2023-05-20  7:34 ` Christoph Hellwig
@ 2023-05-25  9:27 ` Christoph Hellwig
  2023-06-05  8:48 ` Christian Brauner
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2023-05-25  9:27 UTC (permalink / raw)
  To: Yihuan Pan; +Cc: viro, linux-fsdevel, vgoyal, hch

So it turns out my do_mounts.c rework touched a lot of code, but does
not actually conflict with this patch.  Can you plese reflow your
commit message to not exceed 73 lines and resend?

With that:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init: remove unused names parameter in split_fs_names()
  2023-05-20  7:23 [PATCH] init: remove unused names parameter in split_fs_names() Yihuan Pan
  2023-05-20  7:34 ` Christoph Hellwig
  2023-05-25  9:27 ` Christoph Hellwig
@ 2023-06-05  8:48 ` Christian Brauner
  2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2023-06-05  8:48 UTC (permalink / raw)
  To: Yihuan Pan, hch; +Cc: Christian Brauner, vgoyal, viro, linux-fsdevel

On Sat, 20 May 2023 15:23:32 +0800, Yihuan Pan wrote:
> 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.
> 
> 

I fixed up the commit message as requested by Christoph.

---
 
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] init: remove unused names parameter in split_fs_names()
      https://git.kernel.org/vfs/vfs/c/7f1d63536bee

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-05  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20  7:23 [PATCH] init: remove unused names parameter in split_fs_names() Yihuan Pan
2023-05-20  7:34 ` Christoph Hellwig
2023-05-25  9:27 ` Christoph Hellwig
2023-06-05  8:48 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).