From nobody Fri Apr 10 22:21:40 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DA40C00140 for ; Thu, 18 Aug 2022 21:14:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347055AbiHRVOe (ORCPT ); Thu, 18 Aug 2022 17:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346879AbiHRVKm (ORCPT ); Thu, 18 Aug 2022 17:10:42 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A10D91F5 for ; Thu, 18 Aug 2022 14:05:45 -0700 (PDT) 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=68cUqf9UrUT5mwycQFUojow6Y6Z HyDepGewBH1vtON4=; b=IKvPdPTDAFBq8BfaK441XHm0H9AGwit8+TE+Xu63wHx LWHQUip5dzx2uT1HAu4/HDjR11DP6lV+70mFCmgW0i7s2CIiHJSAkb8GX+lW9nul CzG8T5QoMrfWMxB/j/0bKExNdXRC9QKXikTtFewArR+zUkPAgxqhYR5b9pvhJlLU = Received: (qmail 3963281 invoked from network); 18 Aug 2022 23:02:26 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:02:26 +0200 X-UD-Smtp-Session: l3s3148p1@+hZ1TIrmb8Uucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, dev@openvswitch.org Subject: [PATCH] openvswitch: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:02:25 +0200 Message-Id: <20220818210226.8587-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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-=3DwgfRnXz0W3D37d01q3JFkr_i_uTL=3DV6A6= G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang --- net/openvswitch/vport-internal_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-i= nternal_dev.c index 5b2ee9c1c00b..134bc8503461 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c @@ -65,7 +65,7 @@ static int internal_dev_stop(struct net_device *netdev) static void internal_dev_getinfo(struct net_device *netdev, struct ethtool_drvinfo *info) { - strlcpy(info->driver, "openvswitch", sizeof(info->driver)); + strscpy(info->driver, "openvswitch", sizeof(info->driver)); } =20 static const struct ethtool_ops internal_dev_ethtool_ops =3D { --=20 2.35.1