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: 12947906 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 534AFC00140 for ; Thu, 18 Aug 2022 21:02:16 +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=WzQpLyWB/X8dKJDgZPQ4V8bu80s7aQfnhboR5PeVN/o=; b=qCOJTx91q4ImBp r0eXQKWgNmF1Mi7dR3Zr1g6CMtJkYTyZRR8+ML45UEoE8sM4/X2pHrikUr1NYDP9+uzP3hczWN8X0 CaWB0CPZ23Q58F61ACU8N3D8sgOiGhI9toPC5XzUd76iPIkTYfezrA2PhaDuJ92jHCMUjvj7lmpBg PvuTPgV0DOZNlpTYa6jOQ0HepH5poM9rYp2PFc+bsBN8ER0USHcIfZZVp+GRgmtpI1e+X+4kzA8vi 9zAsl5hsnyHSRON0dAJZ2G3pvIFKkc3m5igf0gyykuHx6J2hu1MS5NwHyajUvzO7U2WGktovAXyD9 qkqB/iotI/NQffjVvSJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOmed-009ar7-Ez; Thu, 18 Aug 2022 21:02:15 +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 1oOmeV-009ak0-6u for linux-phy@lists.infradead.org; Thu, 18 Aug 2022 21:02:08 +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_140207_596709_7723ED04 X-CRM114-Status: GOOD ( 10.32 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=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)) {