Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp375908lqp; Thu, 21 Mar 2024 04:15:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGyES09YdnDk6DGOoGkBThol3Euru+OI5gF15FvrK8R/PLxz2Q/+1L0Ws1IAu8fNFN1JljrbW6fpnJFZ6O2ACM7ku9G8sC+z5OsK7BEw== X-Google-Smtp-Source: AGHT+IF79jh3NwbAL9ZNBFuAAg7lKljU7hSjKQVggrqOHkucI1vQFoaO05wrFtZAxzTSXOhyYc89 X-Received: by 2002:ae9:f709:0:b0:789:e8e8:f674 with SMTP id s9-20020ae9f709000000b00789e8e8f674mr4346495qkg.30.1711019752639; Thu, 21 Mar 2024 04:15:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711019752; cv=pass; d=google.com; s=arc-20160816; b=VFKNrYdiO9WmcJ+ccsRpdW3/fy3KMHxH/xuUxW/fAWnOJlZLIgQKv12Q0d6Fouc077 qq8qmSwufs+ji7pTZ2fmC0Nh+usf1LpsvOit11kMREVSLaCMS9SiRxrcSXHq7QxpOXC0 MI11ESiZ8HNr0IqgA+NStXdDflykjTxZSxCmJz7mqxoXomVh5A6WsTytUWz692I0EhZc omjUYF5rDfD1IoXDSUVZKGlBib/FKDOCKAkOS4l4mNpPCv079+W7yVrm5D61PzWYSKbb Yr/nr3tNDSYfFGowObuY0Hl3cYC72PcuChpjaKNTdJNYFnWZ45hK6UtH0f3UNAt+B2xr xCTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CiQzgjsr/CUGhlBO4xmPlhgM/yrEhI4VEOpRbHRv9TA=; fh=LZ1AvbchsFHGAqCBfo73fvZ+JDH7oKCQ9n0G9UmBJno=; b=Q4IBGd99x039c9ncgZCNOKHDCNgGYSPKe2oHdnz+s9/yIfWJleJf/DSnmBlJNg41JZ uQ8oQJCJeWBIXcsMuknHYiDWZwymPiRjPJPD2affMM6Y+u++IHSUM6krNRyZ4Qk+FkSn dh1IW9h6jRffef4rwKaFC/I5gJteMwRMqrFs6yVwIO4F4KWbj0ldipV1vj/ydDoizf2M IOg/TmSk83P3aEZfwVg9e35DRYVFB30e5JdK83b0SV4QfzgaXoHfD2TuEC2/5aiCGqDW pCI3WRDpL61jPctIcawG58m1tWSiYGf+tajnXrNYpd2P6HwVWLWd26VHQUb11olRuAqb kJdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hJsfjmQM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h1-20020ae9ec01000000b0078a168f9126si4814923qkg.412.2024.03.21.04.15.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 04:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hJsfjmQM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 60C1F1C212A4 for ; Thu, 21 Mar 2024 11:15:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D91F58ABF; Thu, 21 Mar 2024 11:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hJsfjmQM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 39B3057876; Thu, 21 Mar 2024 11:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711019725; cv=none; b=Ugyqc220A4wHKvHISFxyZwuYxV+0LPw1t+QdtssKZeeZ9s3/avzi4Buwi9UeFHPafGIDTPZ42C7OGrAo/s7WxCCjLUh9Jb0nngelbjbSWFnNyRTxrW+b2azImKpLxHzcx89UMeaWtdzu5vLwvwHPEpINx19+Im/Bqn5NSoXzwR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711019725; c=relaxed/simple; bh=fKCUlACMfauRrP+F9j+WWaw7J65ipX56Y+2OPskcuIU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g5Wt7hXpLyg4AK7YrV7CF91KGYYl6PiwtdgSG5eXiebhmjKG4abgV+a7+dmk+TmPBaQc36+UhMxWu2txicZzCPS9i383v5NZWmThtBR1AI537ncnLmj3ywYJapJv14987+gcY3sQvKB/Vah1yPF9fJwNyGCRk5PcKxwyhyd/82Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hJsfjmQM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28672C433C7; Thu, 21 Mar 2024 11:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711019724; bh=fKCUlACMfauRrP+F9j+WWaw7J65ipX56Y+2OPskcuIU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hJsfjmQMYsqYM2STf6PHk9l9mwna+NQDtgI3v0Ibiskx4u7M1XEVLrhAkisLOeYjs EL7WaCVymVCvjo8gmI8jDdD6307vPwQn1BR7njvrBS2lAsAkwUN2xkaNq70OPH7MPa Ipecd8WnyZ946t1umDdKs0tNC9BSSLmikEYNvdCaMp91pvcoV6c3xbPfVRuSudCb38 X+Z4XT47rmt+HgjanyfjCNga03FnMgZWn63gTivoA6NR969jFi1gkjqD/S7L3pzIDV MUsr2ZLGcC4zVFbcr5Yaqs04Ri8NFtriU6Lv444ddUbXB94xALaNCtfLoJdJKS4sG5 3ORzfIETF0y1A== Date: Thu, 21 Mar 2024 11:15:18 +0000 From: Mark Brown To: Barry Song <21cnbao@gmail.com> Cc: Andrew Morton , Stephen Rothwell , corbet@lwn.net, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Barry Song , Chris Zankel , Huacai Chen , Herbert Xu , Guenter Roeck , Max Filippov Subject: Re: [PATCH] Documentation: coding-style: ask function-like macros to evaluate parameters Message-ID: References: <20240320001656.10075-1-21cnbao@gmail.com> <20240320124207.0c127947@canb.auug.org.au> <20240320084919.8e18adb418347feed6bfc8ae@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TAcSmNRE4p6o+wUy" Content-Disposition: inline In-Reply-To: X-Cookie: MIT: --TAcSmNRE4p6o+wUy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 21, 2024 at 07:48:36AM +1300, Barry Song wrote: > On Thu, Mar 21, 2024 at 4:49=E2=80=AFAM Andrew Morton wrote: > > Stronger than that please. Just tell people not to use macros in such > > situations. Always code it in C. > While I appreciate the consistency of always using "static inline" > instead of macros, > I've noticed numerous instances of (void) macros throughout the kernel. =2E.. > I'm uncertain whether people would find it disconcerting if they complete= ly > deviate from the current approach. > If you believe it won't pose an issue, I can proceed with v3 to eliminate > the first option, casting to (void). It might be worth adding a note somewhere in the file that talks about how the coding style document is convering the current state of the art but some files might older and not following the current style. This isn't going to be the only thing where there'll be issues like this. --TAcSmNRE4p6o+wUy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmX8FsYACgkQJNaLcl1U h9AMfwf9HeqraXnXYAw78tCMuY0c1TL2y4BWC0+oKGPXHbxTF9LV17xmodaBRTBp LglMvk9nR02owGQSdhqz3csnWWQp2/Qg47UkSNOl//Vplk5wCBujNtA0+ojtD9oD zf0VRykp1ifuYu5TMA12dAGZlJlYuKbjzWIlGRZiAJgCxsOTnfMSrzYHVjiQB7cH gnUBrUCHyGCFikMLUOdPPERN+XrUxClfIQiv80gF7BM5iDoD8F1bqgNSbl/+7xpE a8V5Kf98YMGCeGhCfc7hbnqJS58027LhgY5c/JbuavBZl8kL+HvkoMtdjyK0ZXoU 8VjGqD2egSNvzVZjxxI20l49UlaCoA== =ic4b -----END PGP SIGNATURE----- --TAcSmNRE4p6o+wUy--