From: Bjorn Andersson <quic_bjorande@quicinc.com>
To: Shubh <shubhisroking@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] soc: qcom: cmd-db: refactor deprecated strncpy
Date: Wed, 4 Oct 2023 16:18:02 -0700 [thread overview]
Message-ID: <20231004231802.GD3553829@hu-bjorande-lv.qualcomm.com> (raw)
In-Reply-To: <20231004044017.37027-1-shubhisroking@gmail.com>
On Wed, Oct 04, 2023 at 10:10:17AM +0530, Shubh wrote:
> Prefer `strscpy_pad` to `strncpy`.
>
> Signed-off-by: Shubh <shubhisroking@gmail.com>
Please spell out your name on future patches.
> ---
> drivers/soc/qcom/cmd-db.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
> index 34c40368d..dc42704d7 100644
> --- a/drivers/soc/qcom/cmd-db.c
> +++ b/drivers/soc/qcom/cmd-db.c
> @@ -152,7 +152,7 @@ static int cmd_db_get_header(const char *id, const struct entry_header **eh,
> * query string is not necessarily '\0' terminated if it bumps up
> * against the max size. That's OK and expected.
> */
> - strncpy(query, id, sizeof(query));
> + strscpy_pad(query, id, sizeof(query));
Please read the comment above, and please read fe72f9bce137 ("soc: qcom:
cmd-db: replace strscpy_pad() with strncpy()")
Thanks,
Bjorn
>
> for (i = 0; i < MAX_SLV_ID; i++) {
> rsc_hdr = &cmd_db_header->header[i];
> --
> 2.42.0
>
prev parent reply other threads:[~2023-10-04 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 4:40 Shubh
2023-10-04 23:18 ` Bjorn Andersson [this message]
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=20231004231802.GD3553829@hu-bjorande-lv.qualcomm.com \
--to=quic_bjorande@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shubhisroking@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
all inboxes | Powered by JetHome®