[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSWlppHwravDLyZN@google.com>
Date: Tue, 10 Oct 2023 12:27:34 -0700
From: Joel Becker <jlbec@...lplan.org>
To: Breno Leitao <leitao@...ian.org>
Cc: kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com,
Eric Dumazet <edumazet@...gle.com>, hch@....de,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
horms@...nel.org
Subject: Re: [PATCH net-next v3 2/4] netconsole: Initialize configfs_item for
default targets
On Tue, Oct 10, 2023 at 02:37:49AM -0700, Breno Leitao wrote:
> For netconsole targets allocated during the boot time (passing
> netconsole=... argument), netconsole_target->item is not initialized.
> That is not a problem because it is not used inside configfs.
>
> An upcoming patch will be using it, thus, initialize the targets with
> the name 'cmdline' plus a counter starting from 0. This name will match
> entries in the configfs later.
>
> Suggested-by: Joel Becker <jlbec@...lplan.org>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
> drivers/net/netconsole.c | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index d609fb59cf99..3d7002af505d 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -53,6 +53,8 @@ static bool oops_only = false;
> module_param(oops_only, bool, 0600);
> MODULE_PARM_DESC(oops_only, "Only log oops messages");
>
> +#define NETCONSOLE_PARAM_TARGET_NAME "cmdline"
Perhaps `NETCONSOLE_PARAM_TARGET_PREFIX` is better. Makes it clear this
is not the whole name.
Thanks,
Joel
--
"When I am working on a problem I never think about beauty. I
only think about how to solve the problem. But when I have finished, if
the solution is not beautiful, I know it is wrong."
- Buckminster Fuller
http://www.jlbec.org/
jlbec@...lplan.org
Powered by blists - more mailing lists