Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3225271rwa; Tue, 23 Aug 2022 00:33:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5pO8YXUV9o/tOtvVdLp00in9w11XsPgwnjM1E0SGC6m3Gy81PkTQlg+x5dotEu059KAsqQ X-Received: by 2002:a63:6a48:0:b0:42a:3cab:cc36 with SMTP id f69-20020a636a48000000b0042a3cabcc36mr16360468pgc.135.1661240032962; Tue, 23 Aug 2022 00:33:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661240032; cv=pass; d=google.com; s=arc-20160816; b=ugRKWE6cv1Du9RdEr6YIW7/f4KR5mF1MVeh+QRKgx0r3I7YjH+dcLG1HACXbMkOPcv JfQtetZX2ePYD3I618NKlQVJdgWBV8pyBm2pxHoDyLvvA84x7lJbe9Y6x1mybnq0E5bE GkE8KsDPlcelQIGu1MM3VYDPuRbmqQGxivOnfSgkgUqHGS+Tv8Yy6Y9VLH6tSBsZkk7+ CCLq/wBVdnOEc0+drf+8YZ+PkPRoyAnF3Fc8SSwSvSc3U092FbtFNOU34rtHGcLcCpNM CrGO7DeBDp4bFtk8pBRg1BwYZhMF7FP88+09t4s8Rs5zz+0E+Yn8cZ3oZgq0rFe6sDop WITQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:in-reply-to:date:references:subject:cc:to:from :dkim-signature; bh=az2HdoyG85YfEqGnT6FuQVIJiIp4n5HRHLNqEBg6cuo=; b=EBZ1m8obaamEupPO8hTvPyM0IFvJh0nTxE3VQ2sQ/41hTrNg+SIls+Vmdf5zjJUwG3 brFo0djq2uhoUWWTggxrZVIgWblckVzb5z5tg2V7wkrok7qmlZ9+3Smy2m+pVXDMRWxb jTKNqdgKM87Gt/VmzhLCrP6+u9RP0jOR9c7Aohp52yrzElHVlngWBZSRmSBflbh0XuDb NHCrv5iuhMLOt99wwV8HgoGHRnDhLsW6k7EvYyHTyLW9O2LMad0hp97Oi11ZxaeGv+uF PX5/oBx2bk8NteCfRPU9IgW92Jop+4XvlZpEDZSXHNVtn9r8o+uVp3RVuegyN8NfyhBU hLXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=qtoW7AS+; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi3-20020a17090b1e4300b001faf63a881fsi12367553pjb.144.2022.08.23.00.33.42; Tue, 23 Aug 2022 00:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=qtoW7AS+; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240533AbiHWHJ4 (ORCPT + 99 others); Tue, 23 Aug 2022 03:09:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240611AbiHWHJl (ORCPT ); Tue, 23 Aug 2022 03:09:41 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70049.outbound.protection.outlook.com [40.107.7.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE29561B0D; Tue, 23 Aug 2022 00:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VxN4WIta4n5Ao+6UlAvyfmCZx94keAWVza2mhD72yUB1+na1y5OfImI8xjNEP/9a8HD3ZbxGdOT7lZx1ss95TRHpqzBwPkMV84YTZ+o4ngjRKZBLj1gQFVDPIOV0c6MelBVGElfULY6aXzbK0VswfwdKaIVJvdInjIOCCpgz7yfdXhm9Tyk0/CUU7/1oaQ2TuJ9GOb3DGqS65ZnTo3BnlxaTA0OW454Cd9EHkLv1F5tvXkW+G1+0ccrRdwDJQQQipnBZb0CXne7FWgWFIav1smlkThLmeJgflEoeTwPGUhKgluDgMkh7Z18Ap2rrnr3QKRFxz/V0kBBZ41BFbF1mrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=az2HdoyG85YfEqGnT6FuQVIJiIp4n5HRHLNqEBg6cuo=; b=BePG3p+SqwUAPU6tpl75OCye2Fs5vC/9/Jv6M4AD91Y5ScqgwE2m11JNHLPsmjd9gAH5mpY5Nl27vBADVAO35yj3yEpoypQpf5B0AMjEE/UN3SFcqh1w6fPFz4MJxBuQ0ORri02fnRIEtCDkFcr2wFeq0vntoqD4zt/PnflvHKccWtMA437cvKVGslgeTIX6B0JZRVOQyMfdGZob7Z9OEubgDuKz2AJNP2IhggezoURFio1tNGHP+pZCF2fUn8UH4pqKf8EkYaAQmLRhayvXCTHtKoygw9zUjlSYOarpD5Kz+eCOaViV/Ni3W1oVKtZY1Jz1C8O6j9nWBEhHni3S3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=piap.lukasiewicz.gov.pl; dmarc=pass action=none header.from=piap.pl; dkim=pass header.d=piap.pl; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lukasiewiczgov.onmicrosoft.com; s=selector1-lukasiewiczgov-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=az2HdoyG85YfEqGnT6FuQVIJiIp4n5HRHLNqEBg6cuo=; b=qtoW7AS+ylwbUP+asfW+gUbot18lKwY94X+CgHL31DXSqF1J9jP7RjRH9qyxpU9Z7e6MJChlaDPB6Wtnvsw1zTX9QwdobvJ9LZHNlEOgzhyRekhRUQ2ThAA2jTde+MZxhVH7nb0dDfTk6GWggijhCy+SPnKRYRtLYGeVEEXREyo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=piap.pl; Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) by GV1P193MB2021.EURP193.PROD.OUTLOOK.COM (2603:10a6:150:2b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.19; Tue, 23 Aug 2022 07:09:35 +0000 Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::a5b7:27f6:4886:a478]) by VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::a5b7:27f6:4886:a478%4]) with mapi id 15.20.5546.019; Tue, 23 Aug 2022 07:09:35 +0000 From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] net: move from strlcpy with unused retval to strscpy References: <20220818210050.7108-1-wsa+renesas@sang-engineering.com> Date: Tue, 23 Aug 2022 09:09:33 +0200 In-Reply-To: <20220818210050.7108-1-wsa+renesas@sang-engineering.com> (Wolfram Sang's message of "Thu, 18 Aug 2022 23:00:34 +0200") Message-ID: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: FR0P281CA0001.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:15::6) To VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59930e7b-ee3a-4950-ce0b-08da84d66f15 X-MS-TrafficTypeDiagnostic: GV1P193MB2021:EE_ X-MS-Exchange-AtpMessageProperties: SA|SL X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gUHtcXhZ1Zof1wtfF/MePrgpJyWHjrISef2o3EugTuC8C5ais44+avjcH1OePG6smrAgcPzzGp+l8TicQ+GBbnuGTBwvTaOg/cSEQpPFOgS9mg/fVOJx8uEVdNwmfUn0deNH0wfIK5mk2yHFMc8If392sNvt9XfWgNTA6RHGqNT03kdaOsP9XpITe50BsJ/47wgPX4opOkY6ogzJ/NeqK6W7kXrR3maoj5IIiL6bWrLes1vizboP9rcp/1RSV4S5AhHZXJW+XBJg99pP7TfZnVniMMIeAUx3oidtuKG2sNNKa5IrSQ10fcHDF/rSP9pj/lxmuN4XpB6NIZ5RtiLOFBj8R8Fs1zNQVWJydc4k/JwME9SgD5p0mqrJT5askVBoOkliyyW+oZV4Qm5bTCMbyw+lwxcSGqQM2s5gepJpmihmwi06KUbInT6LtYIuHWqzJASjupc8mPb197AT1Yx/9deeZAPdBUX3QL9Piqau+7W8Q1S2Z5kbKUptFDM1igu+8z+BbwBMSSWbTtbr6mr/nRu8x0Sovo87UJ7iFg1Gmn5/8BU1zd4IdKCK+uXZZEW0GsUKogWD9Zik8SsKowRPq2jbpbnrTiVomMYMah2JF1VKoKyKAJBZOaRcmzSaizLo8eQ3F5XyCy6SoIux4vBbTvpQgcXx0YTDhgXkWWJnpWf384Ci91OL5bgXV7IPsPcsxIQQcNpq3gdxPst3dWwQbNiwAhj46a2MjUm9ixGBPrTdfxImX66QuPOlRpdLnT+EhxhgAZjwgvER+IDKduyI8ad5jDfsGX6AqP2iNBtipPE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0685.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(376002)(39850400004)(136003)(366004)(346002)(52116002)(8936002)(6506007)(26005)(6512007)(5660300002)(4326008)(66556008)(8676002)(66476007)(66946007)(316002)(786003)(2906002)(38350700002)(38100700002)(186003)(42882007)(478600001)(83170400001)(6486002)(41300700001)(156123004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dEhlTVFhK2hWWmFoRzlFb05QRjRzUXVCTTgzT25WYWdQZEg2ZDZuK2hOazd0?= =?utf-8?B?TUVMMVJ2YkMwR3lQSk53MkNWMDhpZHZjQ1dCRFllOGxKbDJWdnJtWjA0ejlI?= =?utf-8?B?Wm5xZkFpMGs0T3Q2OW9NREhxcjkyYXRoZEtaamFaano2bE9RL0UzVTEyV3hE?= =?utf-8?B?YjVKWEo4dE5GRlJGTWFZN01pZi9sT2ZNbE1nLzNmcFBiTFNxTXJEc3M1NXlI?= =?utf-8?B?Q1oxRFh2T3I5QjdOQWExOThvWGZoU2VRcVkxNGlXR295d0Q2K0hOYlpqWm1q?= =?utf-8?B?OUlkd0Z5QytsRDExZkdiMy9yVFhGQmZ5bG1KM1FHZVJYRHloc3hNQzR2Y2dm?= =?utf-8?B?SWhCY1AvQ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KMGpCM3F4TG1FRXZG?= =?utf-8?Q?E0+OMN/ox+LmKx6lzz6asNf1DcaDr0DbGPFwVX/1gPo7?= X-OriginatorOrg: piap.pl X-MS-Exchange-CrossTenant-Network-Message-Id: 59930e7b-ee3a-4950-ce0b-08da84d66f15 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0685.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 07:09:34.9007 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3e05b101-c6fe-47e5-82e1-c6a410bb95c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OEiIMCAW++QoJKjgF9zC2p8lTJMGQVeFGfT7H+NtV1/YSgXFRSe6p5kfykWLtFW3fGpOYMUB7a76YwLzNCuSrWqSXs06N8TX6gBSBlMLxn1vP/QALVdT3l8cuCiD2Eop8HU5s9TTlxH36DdicaQXSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P193MB2021 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wolfram Sang writes: > 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. Looks good to me (IXP4xx Ethernet). Acked-by: Krzysztof Ha=C5=82asa > +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c > @@ -999,11 +999,11 @@ static void ixp4xx_get_drvinfo(struct net_device *d= ev, > { > struct port *port =3D netdev_priv(dev); > =20 > - strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); > + strscpy(info->driver, DRV_NAME, sizeof(info->driver)); > snprintf(info->fw_version, sizeof(info->fw_version), "%u:%u:%u:%u", > port->firmware[0], port->firmware[1], > port->firmware[2], port->firmware[3]); > - strlcpy(info->bus_info, "internal", sizeof(info->bus_info)); > + strscpy(info->bus_info, "internal", sizeof(info->bus_info)); > } > =20 --=20 Krzysztof "Chris" Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa