From patchwork Thu Aug 18 21:00:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12947903 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 359FBC00140 for ; Thu, 18 Aug 2022 21:03:22 +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:MIME-Version:Message-Id:Date:Subject:Cc :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=zgxUWt8+5b/o0L75Cnt3AgCtpnaKKhP1pAhPGYbL/2M=; b=uunKGX8JWUYsrN X4IrevLciK8v0v2+L6DOmHm3cg9sWZUGS16A9h3JRM+CR+jMH9nuumhDqzReLbV6xPHoXRVU0tALO mAvWP8gB2pJq2uUbEaxPVsaGB0ytb2ZicxtklN11YQRTjpmwRjRkFFhFia0qZrEm/7V90STzqscpA O0J+3OyRkdTQl7iixsPkDFZmECaJZ/NiB8AmLeIyconA5Rdfq9s3PfIMilNu2RP1EEigHMmZzffIZ GslEC24v5vv704I8E/xoQzwVIeXKtjWolJv6f/nofX25xN2FutRxOZW1MA6wLJEn3wwj4pbC0U1Sg U/amkygHTJRKoDQxCrqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOmee-009arY-RS; Thu, 18 Aug 2022 21:02:17 +0000 Received: from www.zeus03.de ([194.117.254.33] helo=mail.zeus03.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOmeW-009alE-LQ for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2022 21:02:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=xe2n49pb2AwrM/1cmGwYIahtd+e WqXgBEjq8bdQuATA=; b=avZ0Y3le6/BADjbNTC82MCTWJEWPhLCg6lRwUq5dlv6 ewhGtqL3ow9GG55IK8RP8Vk4rbTfufUdm8nH7BjCw3779ZvOw0bxXpbbeT06gwnj FBic+VmO13hMl5qxLa1NPN45AQ9/0DMZJhgLxNnKE9D5EKvurYUZ7c5+AOcex0bc = Received: (qmail 3961133 invoked from network); 18 Aug 2022 23:00:57 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:00:57 +0200 X-UD-Smtp-Session: l3s3148p1@TggiR4rmYvUucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Kishon Vijay Abraham I , Vinod Koul , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH] phy: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:00:56 +0200 Message-Id: <20220818210056.7205-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_140209_017981_B1FAAF7F X-CRM114-Status: GOOD ( 11.31 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Acked-by: Jernej Skrabec --- drivers/phy/allwinner/phy-sun4i-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index d5f3b42eb8ce..3a3831f6059a 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -768,7 +768,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) if (data->cfg->dedicated_clocks) snprintf(name, sizeof(name), "usb%d_phy", i); else - strlcpy(name, "usb_phy", sizeof(name)); + strscpy(name, "usb_phy", sizeof(name)); phy->clk = devm_clk_get(dev, name); if (IS_ERR(phy->clk)) {