From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39E6738FA5 for ; Thu, 26 Oct 2023 17:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eFjrFq1w" Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E86D7B8 for ; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6bee11456baso1142909b3a.1 for ; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698342594; x=1698947394; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XCBnAelfrExSVbW+xUZ57lPgMmCuRd7/6v3ahFmt0UQ=; b=eFjrFq1w4XMwQ0pGrT9SjS1/cJTmRZf1KchALMHH2vja37ybo9yBGD8g3b109KUjGR 5YFSKf1WbYD9dATk29VqmsiIxHKDdbIVX5E54Fm9tRikbDz0DJUDfrNiYzW0H5M4h0Yl GTX6n8D01O0Bo7d6wxuvomBsZGGN2MctMj1jw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698342594; x=1698947394; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XCBnAelfrExSVbW+xUZ57lPgMmCuRd7/6v3ahFmt0UQ=; b=hB3Lx2kAA/H9Wv3k++Cv6C+fnTKPjv8pbv3Qctf6p9soJi+F7qFO7lYiViXVfpNpHJ Ko1e1hkmFrB7TZ/c2ZUUdzvJzfPog/dvoroA6NtJtoz9WlhisdJX7Xa/SxrWFmh8dVV+ 5a7saVMjwPaEKScjGu8LdLZT1CemiEEKc1WF8jlWrDEN1pJyLGkJRXTwqWAsiTEyUoYL Ts9KRE9UiK1yo1S8HFsCb1kBW/cTjY/sLSLnpVLQeuEoMpyIR5txic8yqQi6OzqvyLhN wT/O9WzM9eDS2aF1Jce/ssquUziyGOSWUMOPL5wfgh715b+SkRCgXXgBM7rQ1ChZ8zxx g6Tw== X-Gm-Message-State: AOJu0Yz1mLFshGoWV1KlARHYzOqsturEYiwE/QtZgLCixVg28y+3YBGz y20wxNcmqPwsP94cIS5/lgUyXg== X-Google-Smtp-Source: AGHT+IG87R8BwwTXzaOKmt0xY+aN41MPhqHb5ClUMx1ejA2Lx369UqLmh7RXbmhIojMj+YrG8hOxiw== X-Received: by 2002:a05:6a00:194c:b0:6bd:f224:c79e with SMTP id s12-20020a056a00194c00b006bdf224c79emr255124pfk.11.1698342594396; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id k17-20020aa79d11000000b006933866f49dsm11781901pfp.19.2023.10.26.10.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Date: Thu, 26 Oct 2023 10:49:53 -0700 From: Kees Cook To: Joe Perches Cc: 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 , Shannon Nelson , Brett Creeley , drivers@pensando.io, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Ronak Doshi , VMware PV-Drivers Reviewers , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , intel-wired-lan@lists.osuosl.org, oss-drivers@corigine.com, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 0/3] ethtool: Add ethtool_puts() Message-ID: <202310261049.92A3FB31@keescook> References: <20231025-ethtool_puts_impl-v1-0-6a53a93d3b72@google.com> <202310260845.B2AEF3166@keescook> <39ca00132597c0cc4aac4ea11ab4b571f3981bcb.camel@perches.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39ca00132597c0cc4aac4ea11ab4b571f3981bcb.camel@perches.com> On Thu, Oct 26, 2023 at 09:33:17AM -0700, Joe Perches wrote: > On Thu, 2023-10-26 at 08:47 -0700, Kees Cook wrote: > > On Wed, Oct 25, 2023 at 11:40:31PM +0000, Justin Stitt wrote: > > > @replace_2_args@ > > > identifier BUF; > > > expression VAR; > > > @@ > > > > > > - ethtool_sprintf > > > + ethtool_puts > > > (&BUF, VAR) > > > > I think cocci will do a better job at line folding if we adjust this > > rule like I had to adjust the next rule: completely remove and re-add > > the arguments: > > > > - ethtool_sprintf(&BUF, VAR) > > + ethtool_puts(&BUF, VAR) > > > > Then I think the handful of weird line wraps in the treewide patch will > > go away. > > > > Perhaps this, but i believe spatch needs > --max-width=80 > to fill all 80 columns Ah, yeah. Default is 78. Current coding style max is 100... I'll adjust my local wrappers. -- Kees Cook