From: Steven Rostedt <rostedt@goodmis.org>
To: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Cc: <mhiramat@kernel.org>, <paulmck@kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>, <quic_tingweiz@quicinc.com>
Subject: Re: [PATCH 1/1] fs/proc: remove redudant comments from /proc/bootconfig
Date: Tue, 2 Jan 2024 21:18:27 -0500 [thread overview]
Message-ID: <20240102211827.0841c0df@gandalf.local.home> (raw)
In-Reply-To: <1704190777-26430-1-git-send-email-quic_zhenhuah@quicinc.com>
On Tue, 2 Jan 2024 18:19:37 +0800
Zhenhua Huang <quic_zhenhuah@quicinc.com> wrote:
> commit 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to
> /proc/bootconfig") adds bootloader argument comments into /proc/bootconfig.
>
> /proc/bootconfig shows boot_command_line[] multiple times following
> every xbc key value pair, that's duplicated and not necessary.
> Remove redundant ones.
>
> Output before and after the fix is like:
> key1 = value1
> *bootloader argument comments*
> key2 = value2
> *bootloader argument comments*
> key3 = value3
> *bootloader argument comments*
> ...
>
> key1 = value1
> key2 = value2
> key3 = value3
> *bootloader argument comments*
> ...
>
> Fixes: 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to /proc/bootconfig")
> Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Nice catch.
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-- Steve
> ---
> fs/proc/bootconfig.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/proc/bootconfig.c b/fs/proc/bootconfig.c
> index 902b326..e5635a6 100644
> --- a/fs/proc/bootconfig.c
> +++ b/fs/proc/bootconfig.c
> @@ -62,12 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size)
> break;
> dst += ret;
> }
> - if (ret >= 0 && boot_command_line[0]) {
> - ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n",
> - boot_command_line);
> - if (ret > 0)
> - dst += ret;
> - }
> + }
> + if (ret >= 0 && boot_command_line[0]) {
> + ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n",
> + boot_command_line);
> + if (ret > 0)
> + dst += ret;
> }
> out:
> kfree(key);
next prev parent reply other threads:[~2024-01-03 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 10:19 Zhenhua Huang
2024-01-03 2:18 ` Steven Rostedt [this message]
2024-01-03 21:58 ` Paul E. McKenney
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=20240102211827.0841c0df@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=paulmck@kernel.org \
--cc=quic_tingweiz@quicinc.com \
--cc=quic_zhenhuah@quicinc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®