From patchwork Fri Mar 29 15:29:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10877393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84BEA13B5 for ; Fri, 29 Mar 2019 15:29:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BBDA2943A for ; Fri, 29 Mar 2019 15:29:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 693EF2955B; Fri, 29 Mar 2019 15:29:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0A57229528 for ; Fri, 29 Mar 2019 15:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mZwnvIOPaBZ3Z/yqTAvLgtQ6/6x0519wldAOIW+UMsA=; b=jHGe8gB28YDlxx hpZKbMxrCoafysjoDfwncofiEOT3yHdz7zG8bQ9BpZJ42vs6Z+/rpBDpUgNtsIu8fpDNzesvJqMN2 TWx39SAF5U/ahrBfZyFti5c8gL5DLPgbGYT+9nSTAase1NYo3/GwCPjLbxu02uwmsfJ4IoFIINV6z UvgEI9a39BSVJMMadQA3V+7oimOkApKlBJ/xrZ1cNHkDZgfIKIiopWIMklQscPZJ0rB57WD/xkGev QXnoQZWnj78Sj69hL8oBVZcJaO9av5vJOE+wsv1P5L1lCguEDxAiaFKVP4+ZKxqqzriKEFhEsur2Q rLBlxO+XaiqV1oz8WLmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9tS2-0002g5-3u; Fri, 29 Mar 2019 15:29:50 +0000 Received: from [179.183.99.176] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9tRz-0002fU-J9; Fri, 29 Mar 2019 15:29:47 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1h9tRx-0009mh-26; Fri, 29 Mar 2019 11:29:45 -0400 From: Mauro Carvalho Chehab To: Subject: [PATCH] media: staging: use strscpy() instead of strlcpy() Date: Fri, 29 Mar 2019 11:29:43 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Fabio Estevam , YueHaibing , Pengutronix Kernel Team , linux-rockchip@lists.infradead.org, Ezequiel Garcia , Greg Kroah-Hartman , Sascha Hauer , Heiko Stuebner , Mauro Carvalho Chehab , Hans Verkuil , NXP Linux Team , Philipp Zabel , Steve Longerbeam , Mauro Carvalho Chehab , Shawn Guo , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are a few left overs at staging with were still using the deprecated strlcpy() function. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans Verkuil Reviewed-by: Mukesh Ojha --- drivers/staging/media/imx/imx-media-dev-common.c | 4 ++-- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-dev-common.c b/drivers/staging/media/imx/imx-media-dev-common.c index 910594125889..6cd93419b81d 100644 --- a/drivers/staging/media/imx/imx-media-dev-common.c +++ b/drivers/staging/media/imx/imx-media-dev-common.c @@ -30,7 +30,7 @@ struct imx_media_dev *imx_media_dev_init(struct device *dev) dev_set_drvdata(dev, imxmd); - strlcpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model)); + strscpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model)); imxmd->md.ops = &imx_media_md_ops; imxmd->md.dev = dev; @@ -38,7 +38,7 @@ struct imx_media_dev *imx_media_dev_init(struct device *dev) imxmd->v4l2_dev.mdev = &imxmd->md; imxmd->v4l2_dev.notify = imx_media_notify; - strlcpy(imxmd->v4l2_dev.name, "imx-media", + strscpy(imxmd->v4l2_dev.name, "imx-media", sizeof(imxmd->v4l2_dev.name)); media_device_init(&imxmd->md); diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c index 57611464ad07..58721c46fba4 100644 --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c @@ -462,7 +462,7 @@ static int rockchip_vpu_probe(struct platform_device *pdev) } vpu->mdev.dev = vpu->dev; - strlcpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model)); + strscpy(vpu->mdev.model, DRIVER_NAME, sizeof(vpu->mdev.model)); media_device_init(&vpu->mdev); vpu->v4l2_dev.mdev = &vpu->mdev;