From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: XueBing Chen <chenxuebing@jari.cn>
Cc: hyun.kwon@xilinx.com, vkoul@kernel.org, michal.simek@xilinx.com,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy
Date: Mon, 11 Jul 2022 19:37:09 +0300 [thread overview]
Message-ID: <YsxRtSDbRK+lCnnD@pendragon.ideasonboard.com> (raw)
In-Reply-To: <39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn>
Hi XueBing,
Thank you for the patch.
On Mon, Jul 11, 2022 at 10:05:33PM +0800, XueBing Chen wrote:
>
> The strlcpy should not be used because it doesn't limit the source
> length. Preferred is strscpy.
>
> Signed-off-by: XueBing Chen <chenxuebing@jari.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
> index b0f4948b00a5..f5815465e83b 100644
> --- a/drivers/dma/xilinx/xilinx_dpdma.c
> +++ b/drivers/dma/xilinx/xilinx_dpdma.c
> @@ -376,7 +376,7 @@ static ssize_t xilinx_dpdma_debugfs_read(struct file *f, char __user *buf,
> if (ret < 0)
> goto done;
> } else {
> - strlcpy(kern_buff, "No testcase executed",
> + strscpy(kern_buff, "No testcase executed",
> XILINX_DPDMA_DEBUGFS_READ_MAX_SIZE);
> }
>
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-11 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 14:05 [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy XueBing Chen
2022-07-11 16:37 ` Laurent Pinchart [this message]
2022-07-21 13:34 ` Vinod Koul
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=YsxRtSDbRK+lCnnD@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=chenxuebing@jari.cn \
--cc=dmaengine@vger.kernel.org \
--cc=hyun.kwon@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=vkoul@kernel.org \
/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