From: Dan Carpenter <dan.carpenter@linaro.org>
To: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
Cc: gregkh@linuxfoundation.org, johan@kernel.org, elder@kernel.org,
schopin@ubuntu.com, me@abhy.me, greybus-dev@lists.linaro.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: documentation: replace strncpy() with strscpy_pad()
Date: Tue, 14 Oct 2025 17:15:18 +0300 [thread overview]
Message-ID: <aO5a9izAISpCDJrc@stanley.mountain> (raw)
In-Reply-To: <8918310c-d0aa-4e02-b9d4-9aac98b0a48f@gmail.com>
On Tue, Oct 14, 2025 at 10:01:28AM -0400, Vivek BalachandharTN wrote:
> Yes, Dan. Nice catch. Building it with below sample change:
>
> memset(&intf_load.firmware_tag, 0, GB_FIRMWARE_U_TAG_MAX_SIZE);
> strncpy((char *)&intf_load.firmware_tag, firmware_tag,
> GB_FIRMWARE_U_TAG_MAX_SIZE - 1);
There isn't a need to doing the memset()...
regards,
dan carpenter
next prev parent reply other threads:[~2025-10-14 14:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 13:41 [PATCH] staging: greybus: documentation: replace strncpy() with strscpy_pad() Vivek BalachandharTN
2025-10-14 13:53 ` Dan Carpenter
2025-10-14 14:01 ` Vivek BalachandharTN
2025-10-14 14:15 ` Dan Carpenter [this message]
2025-10-14 16:10 ` Vivek BalachandharTN
2025-10-14 17:13 ` Dan Carpenter
2025-10-14 23:53 ` Vivek BalachandharTN
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=aO5a9izAISpCDJrc@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=me@abhy.me \
--cc=schopin@ubuntu.com \
--cc=vivek.balachandhar@gmail.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