Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp552765rdh; Thu, 26 Oct 2023 09:11:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERQqHdNK0f9gEJz5T9C0/HdU89QClMQgL/WQIevVTsoLpKWCU8/kMiV4ge5DGF51Z+hI3G X-Received: by 2002:a25:ac07:0:b0:d9b:d0cb:db74 with SMTP id w7-20020a25ac07000000b00d9bd0cbdb74mr19270490ybi.33.1698336661032; Thu, 26 Oct 2023 09:11:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698336661; cv=pass; d=google.com; s=arc-20160816; b=bGKnJ8HfgWWIfeSoLMwdG9sm3AtZxcWvWV6viNNwCr7uC2yq3HLvPgsZsYtCkZzq7y H1hOQvP6JJnNpgp4s3zRH8yya9aXSmTt2aCmPgmn3mu4IC9PIO+n5oL9bIX6D5OTjeh0 In+uKrdpzOxoA96LcSDKzvRKyMnB95kWz4cBmMUlx5s206sm9Gsz2QYXidOlYViPVVQC XkqP6q9Oujn8wcSAR9ZwYchko3WUEerzr2NcFQVqSo033TGRW0cilW839b7OVRUh/ZiL Ol52Vc4pkZyoXrq3y9MVK1gw7nxRJ8ADFmJ3bNDqcHQdYUs/GqWnHWEvy+NcDGjUyw/8 a1uA== 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 :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=thMezfOBBeDepm/CN5f52shz+FxucWX1jt+SBaSzv5Q=; fh=66B4SNjUlZw8qBbm/Ng1u6cqcXL9tkyRcOVgNvDyGVs=; b=JxWw3Xo/iZhOx9+2/Ve28jnrW3TmwsKpC25h+C4QEQ3+c2WjkwPVx/lfUEK9UWZm9Z r8ZwTdyQb9nJB6j4CApjQfiglbFEpA3Cl7JcMYEg/JtFlPo5aylNL3y45cK2jAdWCx7z 8Xe4J4pdMRE/j6T9g37emsnzQGcT912Ay3MMYZvzO0GZk6Q7IY5Ngd7Nao/WePidQ4wO 5M//R6l5c5uB8VLERwZtZudDH7/F8lLk5QjdhN5vw2JKuTuVE5I+XH2e5lpuqF9yeITg /xF/+8MW4V/k1daiB2e9S74aQKEbe1gUP1XV7IGKnO5Pj6SVuhP9DK2Zc2NQiUjCj6pr 1FbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=an0Gmfr9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f17-20020a25b091000000b00d9ae4be45adsi15057736ybj.393.2023.10.26.09.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 09:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=an0Gmfr9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2C10E818FBC7; Thu, 26 Oct 2023 09:10:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345222AbjJZQK3 (ORCPT + 99 others); Thu, 26 Oct 2023 12:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbjJZQK1 (ORCPT ); Thu, 26 Oct 2023 12:10:27 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2050.outbound.protection.outlook.com [40.107.244.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 083151B4; Thu, 26 Oct 2023 09:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZXkjDBkVcRMjgvot+DsjIJn+Lvv/NixOOVphYqp5QVB7dGQT7e+dwcMyllKCVc6E4+VKuq3jdOxVk7tYObcSveqlv/73T2b7ztKYhyOYUQYklhZsdDwmQtvPeRmtV9z3KCxcpZ9tFiE0cXcqBf9jKSabBdaebiu13TVew5rn+kexx6wwc0SttO9Ln0MgWO6gdDz46RJPbZEZ5ofOHKi4zmyyMCQQm2GGiv3f6gKmxnt5Zxe6gOeqNXN20txzC3iHa6+se9RDxYVVVwn/07h1lDLfgS/HjgUD27Ggt1txanL2vDGGKTPCSUSWsOOU96gYoKNcRCRGsLFZ1CJ66dCNUw== 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=thMezfOBBeDepm/CN5f52shz+FxucWX1jt+SBaSzv5Q=; b=BKa/OCgLaHSsmMEXBeOi4fN469JZc1kgD6ldOIuZz3D9Cyku4TBfc5J0mOEjY0g860UOgcTxExEXKziGS5tINf/LIk5I6nUE0IcMiDMTeusUIxBIgSQ4Gn8yaU1X4xRgpgJNKc8Zw/P5xNxT0qWDzO8SR/oDZcebEv4NT08pVVMLITsiU4olcQ88mt/NF5r66iPhjvuzcZ2q6FV0i0m9dRt6/B5006JginaZj6AQR3rH3JFYbj8vPNQvSnW8csBthT0kLT+88nRWW7aZELLt5O6acGdK8LnYbvmkeWIdhq0lFE5voOPD2JHjWZ/tj9V6/1FerkQj3kLv+aXAPWUa7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=thMezfOBBeDepm/CN5f52shz+FxucWX1jt+SBaSzv5Q=; b=an0Gmfr9ZdqvPPtUFUKXWcGuc/6n2k66Fy9wdoD6xMGMGpKaves2B9E8fO4FS1XFH5Ek6fu6eflhjrVTYKX1xlOMacD4WLLf97sVJQMQYkkfKkmgTyTrnD1j+WvjK7nQjY/59cV1M3aafPRPgZzKpPGUBABvXoR6wfblOPLKpXo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS0PR12MB6583.namprd12.prod.outlook.com (2603:10b6:8:d1::12) by IA1PR12MB6650.namprd12.prod.outlook.com (2603:10b6:208:3a1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Thu, 26 Oct 2023 16:10:20 +0000 Received: from DS0PR12MB6583.namprd12.prod.outlook.com ([fe80::3d14:1fe0:fcb0:958c]) by DS0PR12MB6583.namprd12.prod.outlook.com ([fe80::3d14:1fe0:fcb0:958c%2]) with mapi id 15.20.6933.019; Thu, 26 Oct 2023 16:10:20 +0000 Message-ID: <24d96a47-bd0c-4110-be64-e0d3a3dc8a24@amd.com> Date: Thu, 26 Oct 2023 09:10:15 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] treewide: Convert some ethtool_sprintf() to ethtool_puts() To: Justin Stitt , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shay Agroskin , Arthur Kiyanovski , David Arinzon , Noam Dagan , Saeed Bishara , Rasesh Mody , Sudarsana Kalluru , GR-Linux-NIC-Dev@marvell.com, Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Louis Peens , Brett Creeley , drivers@pensando.io, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Ronak Doshi , VMware PV-Drivers Reviewers , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Kees Cook , intel-wired-lan@lists.osuosl.org, oss-drivers@corigine.com, linux-hyperv@vger.kernel.org References: <20231025-ethtool_puts_impl-v1-0-6a53a93d3b72@google.com> <20231025-ethtool_puts_impl-v1-2-6a53a93d3b72@google.com> Content-Language: en-US From: "Nelson, Shannon" In-Reply-To: <20231025-ethtool_puts_impl-v1-2-6a53a93d3b72@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR13CA0008.namprd13.prod.outlook.com (2603:10b6:a03:2c0::13) To DS0PR12MB6583.namprd12.prod.outlook.com (2603:10b6:8:d1::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB6583:EE_|IA1PR12MB6650:EE_ X-MS-Office365-Filtering-Correlation-Id: c89489e1-b7e3-4467-ac2f-08dbd63e0d01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cnQjBFS+sXQoiRmSWxeon4lstP/Jv2H9ndi+GHIovkgSkQOLTVoCMg2WLASiNBZIL6OnQjCpRXENIymu7hT4H+fEuiANLsjc7bQGfFZ1MU9NeB4g7QeiSIoqHRMLGxCscJBIqZ0xDP1OOIi46e4mXRI8hCgwj8Ho5j81b4+pgPAl6Es0z+m6+hiraag/CdbGzjHp4HSC/fB7Ag/rOBZsGu/122lcMF92scdWdQVXW9IXgYHFRyJklz1FetV4Ha3L7667e3XUqRAT/fo5ys7nek2/IWQuGxEgkoGLXS6k99swtwUcwfFtfwfLTp9fIjVLc1p82wz3z4O4T5nI8s0W7Vad9nKCSGMwhWVGnM4gapSuV5K1uT8cLtHERzSZ0r/Is+GZcHVNPACLf/V0PXNGfNMIK/YHUKd+CpTNWqEQ4dh2NcnKkukV96N0yoLvDBuE7pujTtoLiEQLDFDO+r1eAenMWfEMmhwfJ2F4tEy1ZLL9hgm8zD3TC3E09eJTDnCXIwX3FiNsMSGI5ScPp1EUH9wRby2r5UaBgnODU5NliaRfxyKF+Mb/h72DUtpK7rnxk3iz8o1JlIW0qZ5OZlvmlP5wRYmjz2OZdfYJ5xMnYIEwLcbPxVl2+Fdlm36/TjLejO0JKovqepLZMKFFMuBHMA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6583.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(366004)(136003)(396003)(376002)(346002)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(478600001)(2906002)(53546011)(6512007)(2616005)(66556008)(31696002)(6666004)(6506007)(26005)(54906003)(110136005)(966005)(86362001)(316002)(66946007)(4326008)(38100700002)(5660300002)(7416002)(41300700001)(66476007)(8936002)(36756003)(7406005)(8676002)(6486002)(31686004)(921008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?LzROZndFZjNia3hRMS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utf-8?B?UWJ2WmFlWS9UZXFReXVycnFIdVBQTEhkWk9MbE5RbmV2eGxUbjdPTmduZElX?= =?utf-8?B?SzJxSkFSdjM1YmJwQkN4LzlZZzZseU52d0N3aVNuelo3SGFIMjlyNWZvQzMx?= =?utf-8?B?WVFMZWlqc3BuMGNzMmZEODRZSVhqdWlNNm9UbFBZNS9aTmZjT3pvd2pjZVIx?= =?utf-8?B?ajBRQjY2dEZzL01ZVExSZE5UWXFMVy9uemZMS042V0RjQUFaOFhhTXhFYVQ0?= =?utf-8?B?Q3kvWDhUa0VaS2NpUlFFWk9aWTVMZHNmU2gzSUZydVl6dTRNVmU1b1hZWFdw?= =?utf-8?Q?1UxtXHwkRT/oYCbTRGcOb9iOa?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c89489e1-b7e3-4467-ac2f-08dbd63e0d01 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6583.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2023 16:10:19.9493 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 84IwVK12b/PxGHjuVupLnbpX+gP3YWk3J3O1DtwOxkB2/syu3SPiepDeajD7GgIC+5P9p2jHKGMGfXkzbyhGlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6650 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 26 Oct 2023 09:10:53 -0700 (PDT) On 10/25/2023 4:40 PM, Justin Stitt wrote: > > This patch converts some basic cases of ethtool_sprintf() to > ethtool_puts(). > > The conversions are used in cases where ethtool_sprintf() was being used > with just two arguments: > | ethtool_sprintf(&data, buffer[i].name); > or when it's used with format string: "%s" > | ethtool_sprintf(&data, "%s", buffer[i].name); > which both now become: > | ethtool_puts(&data, buffer[i].name); > > There are some outstanding patches [1] that I've sent using plain "%s" > with ethtool_sprintf() that should be ethtool_puts() now. Some have been > picked up as-is but I will send new versions for the others. > > [1]: https://lore.kernel.org/all/?q=dfb%3Aethtool_sprintf+AND+f%3Ajustinstitt > > Signed-off-by: Justin Stitt [...] > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_stats.c b/drivers/net/ethernet/pensando/ionic/ionic_stats.c > index 9859a4432985..1f6022fb7679 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_stats.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_stats.c > @@ -258,10 +258,10 @@ static void ionic_sw_stats_get_strings(struct ionic_lif *lif, u8 **buf) > int i, q_num; > > for (i = 0; i < IONIC_NUM_LIF_STATS; i++) > - ethtool_sprintf(buf, ionic_lif_stats_desc[i].name); > + ethtool_puts(buf, ionic_lif_stats_desc[i].name); > > for (i = 0; i < IONIC_NUM_PORT_STATS; i++) > - ethtool_sprintf(buf, ionic_port_stats_desc[i].name); > + ethtool_puts(buf, ionic_port_stats_desc[i].name); > > for (q_num = 0; q_num < MAX_Q(lif); q_num++) > ionic_sw_stats_get_tx_strings(lif, buf, q_num); This works for me for the ionic driver Reviewed-by: Shannon Nelson