[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=VKiPk=G_ZauCwjDqNQuANpoy_jt=nwU1LKj9Ruq2yAaw@mail.gmail.com>
Date: Thu, 20 Mar 2025 07:28:06 -0700
From: Doug Anderson <dianders@...omium.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Jason Wessel <jason.wessel@...driver.com>, Daniel Thompson <danielt@...nel.org>,
Justin Stitt <justinstitt@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Daniel Thompson <daniel.thompson@...aro.org>, kgdb-bugreport@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kdb: Remove optional size arguments from strscpy() calls
Hi,
On Wed, Mar 19, 2025 at 9:35 AM Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> If the destination buffer has a fixed length, strscpy() automatically
> determines the size of the destination buffer using sizeof() if the
> argument is omitted. This makes the explicit sizeof() unnecessary.
>
> Furthermore, CMD_BUFLEN is equal to sizeof(kdb_prompt_str) and can also
> be removed. Remove them to shorten and simplify the code.
>
> No functional changes intended.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
> kernel/debug/kdb/kdb_io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Douglas Anderson <dianders@...omium.org>
Powered by blists - more mailing lists