From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F509C433EF for ; Mon, 11 Jul 2022 16:38:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H20juKzj8blDrYt0FQu50xGUM9ANZ9H/U3eOJ/gn2tM=; b=UE9K/c6RnYc142 RxTyfGQu5XcA6psOMHEmvXFbjkjr5RF+0iTWTuDr1iKER7iA49dZn79Y1Lkv5LUcLrKTZo0LQhizT 97D7spdmAVXl4Z42K7zXA4Aa90cRgb2Nv253VSBhbUxSAUNvdu9zYWhqkE0R7XcFvnlFwIpgnCLR2 cPJTNz0Gfma6EtlwXCvffaJJ1B8n0YbJvrIgrYJJWjhpy0q4Ans9S3Fxpm2oE1TWFuZmwDXyz26Vm A8JpJo65raaTsHsOmBq830QbLWb/sbRpOr2QPxc6N/YYXq2Nvr6n+iBuOYIf94u/fBZq5CM6yWaB5 K0fxrej37/KlPDVOzWGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAwPn-003FfT-Mg; Mon, 11 Jul 2022 16:37:43 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAwPk-003Fd2-K7 for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2022 16:37:41 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BC040326; Mon, 11 Jul 2022 18:37:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1657557456; bh=H0/PNeex08QqGr77w/wMDcNvV0zS5pcv6Pf6XA2aPDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RTHbug2ivmL13wgsm46BJgzLm1/MJcV9RJDHMvgLRee/0y/XcCP8UrOI/QFYWzh7o VBeOT83TvBUmCJy96bBLw+V1gyotx/TrwsBWvuuMLg1i0oawFcQFLqu9ASdrVxTWKv I1eUUiE1uCEt2xlOowiTWy+2JnZouYBDZntKP/1I= Date: Mon, 11 Jul 2022 19:37:09 +0300 From: Laurent Pinchart To: XueBing Chen 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 Message-ID: References: <39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220711_093740_839146_C96816B3 X-CRM114-Status: GOOD ( 16.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Laurent Pinchart > --- > 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