Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp994381imu; Fri, 11 Jan 2019 12:55:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6JErMW8DIvInE6yyB9hmSUtIwtfSBA56V9tGixDiRW05loAdS6BIhhNz/36R+pH9TSZkRu X-Received: by 2002:a17:902:1005:: with SMTP id b5mr11221759pla.310.1547240154929; Fri, 11 Jan 2019 12:55:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547240154; cv=none; d=google.com; s=arc-20160816; b=vpbNE5Tk6r5c8PqNp0aCUD6i5g62hEWFJnZjoihHfxJWhO7tuubZRGv5PLw2OANEGk JsC9oaGbd7Z2wDHCttfoDyJbcUsWc9IUIqtWEt8v91kDfLrlW1TxHAGd/baug78y8D3k tmVtgJDoSzHJMolMUSM3863nYBQHxY9QMoIo/bsrjRE7cgV2zeFyAHxtosAPsmjAssle GnMXGhuGnvusKdi498UmIaejW4Pdx4VY4LmNLfzAruCJKb8eMT9M99JgIPQ3f2KMg9r+ b6amY3y/o4qilA0dEdGtRuseyERYcnV9g5kKzY6SZVPsKL564+a2KyKyMWbyeYZu+egQ RaDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=5Ko/FWRLCeuj+yXZD1eSdFoifFvwbUH6md1uqi+OLoA=; b=YqrnzVIGouAC7M3vnlFyJgZiw+ItW0Jd9QCInXPjez5QgbGAg24UTiPJ7ulfxL3Xmd x4Lq8zEiyRuLUvib5vFVdF1YAYjcoWKyk1YhE6qKnFDVb8AdE3LS2I3rEhIokGyaVoiY HigfgerDV9e0KaDTFRF/kaNUuR+1egeqV8k6vrkRxlCKY/hW8ZkrfsQfMSpecFY3z0cu SaZC3/p5XjsH06Ky1K7/Dz4qyhqA1F2zYAZXpkygwtRDnVLu1k8/hGg+bWDEuc8mDel6 gZp3FtWwbt6usT0gSkKd9kvCfwpGN44ZHM2EHnEg+jhHWfUwTvFYGxmELaGRkIH38kty mYDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IlKiZbZt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si77387224pfy.206.2019.01.11.12.55.39; Fri, 11 Jan 2019 12:55:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IlKiZbZt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732972AbfAKR3r (ORCPT + 99 others); Fri, 11 Jan 2019 12:29:47 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42239 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729727AbfAKR3q (ORCPT ); Fri, 11 Jan 2019 12:29:46 -0500 Received: by mail-pl1-f196.google.com with SMTP id y1so7036046plp.9; Fri, 11 Jan 2019 09:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5Ko/FWRLCeuj+yXZD1eSdFoifFvwbUH6md1uqi+OLoA=; b=IlKiZbZtOF5AzGUGpElai8eVbwzYd0jnPX2QwOwK5GnrYbNreFguwsJxRUCGTWv3Jf 837bOlpLcMQQbx4HkEvbGbmVhe1Jyn8FTLspeFq/tGZnne4NyFF/vgczag3ZfOqKYgvF WzeZEsLXnGWE3NsU48Ijzt/8Q4B1vvKusIb7hO+GZpg2wAbYa3bu1wmSWCMFJ+mHTSmd lIgEszHsIaF3fgNZbCmbJiw6+gU2kkUgLbknSPfPgdwA1wrg6Uu+QyP3y44Hbfyrz4Xy WII0Vuu/H76RpGm2Pkr/7oFQnQJ+40O9Ipb1JYkpY3g2XVMP7jdfkYScEPlC2B/s3n8u yz2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=5Ko/FWRLCeuj+yXZD1eSdFoifFvwbUH6md1uqi+OLoA=; b=DOjFneWu1oZ5Qfiel3SmQs+XtcStjCRFS7L/DGPpjEE2v3TwxB71tq7OOyvm/kcyo8 X5g5VaJzjAGM556I1wJcz80J+Vr38JSdKpewcmEBxnY2NbiJ9gPkDT+JuTvxzdE0IgFU 9EfW9X+xzxnvkESoH595XFzaQELxkPsaO30TMvWs/G4wEXQQ6rhUTxw6fvnT6vWCeGjS bWMG86U2LhoT2TyYeBiQIjbYCQ/RZmSfny1eJ8hHdd1kUmkmoHkf5/hkwxJQwgpBuRNA LKMzGs/9Gr/XBZOiUn3Jbn2x7DLd3U/1mYjQHw2HMYhPvG/nYbXESgfigHaK6zIRA5ou v6hg== X-Gm-Message-State: AJcUukduqT+lK498l5by9BJEX+OwOVwBeo4cOwgQam1igADEZ3wQleab dN+bGQdCjBNjP5MXAdYvsAo= X-Received: by 2002:a17:902:e20b:: with SMTP id ce11mr15019611plb.251.1547227784635; Fri, 11 Jan 2019 09:29:44 -0800 (PST) Received: from gmail.com ([2605:e000:1117:c227:3b53:d0fe:bff:4913]) by smtp.gmail.com with ESMTPSA id l184sm117480471pfc.112.2019.01.11.09.29.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 09:29:43 -0800 (PST) Date: Fri, 11 Jan 2019 07:29:40 -1000 From: Joey Pabalinas To: Jason Gunthorpe Cc: Joe Perches , Gal Pressman , Bart Van Assche , Stephen Warren , Tariq Toukan , "xavier.huwei@huawei.com" , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Doug Ledford , Stephen Warren , Christoph Hellwig , Andrew Morton , Linus Torvalds , "linux-doc@vger.kernel.org" , Jonathan Corbet , "linux-kernel@vger.kernel.org" , Joey Pabalinas Subject: Re: [PATCH v4] coding-style: Clarify the expectations around bool Message-ID: <20190111172940.zufmrhvukqo5hkat@gmail.com> Mail-Followup-To: Joey Pabalinas , Jason Gunthorpe , Joe Perches , Gal Pressman , Bart Van Assche , Stephen Warren , Tariq Toukan , "xavier.huwei@huawei.com" , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Doug Ledford , Stephen Warren , Christoph Hellwig , Andrew Morton , Linus Torvalds , "linux-doc@vger.kernel.org" , Jonathan Corbet , "linux-kernel@vger.kernel.org" References: <20190110234805.GN6890@ziepe.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zp7lkj5ihh2r6cwq" Content-Disposition: inline In-Reply-To: <20190110234805.GN6890@ziepe.ca> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zp7lkj5ihh2r6cwq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 10, 2019 at 11:48:13PM +0000, Jason Gunthorpe wrote: > There has been some confusion since checkpatch started warning about bool > use in structures, and people have been avoiding using it. >=20 > Many people feel there is still a legitimate place for bool in structures, > so provide some guidance on bool usage derived from the entire thread that > spawned the checkpatch warning. Hey Jason, I very much agree that the bool expectations could be much clearer, and this patch is a nice step in that direction! Just a couple small nitpicks: > +Do not use bool if cache line layout or size of the value matters, its s= ize > +and alignment varies based on the compiled architecture. Structures that= are > +optimized for alignment and size should not use bool. +Do not use bool if cache line layout or size of the value matters, as its = size ^ | Adding an "as" makes the sentence flow a bit cleaner: -------------- > +into a single bitwise 'flags' argument and 'flags' can often a more read= able > +alternative if the call-sites have naked true/false constants. +into a single bitwise 'flags' argument and 'flags' can often be a more rea= dable ^ | Missing a "be" here: ----------------------------------------- Ack from me after those two corrections. Reviewed-by: Joey Pabalinas --=20 Cheers, Joey Pabalinas --zp7lkj5ihh2r6cwq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEENpTlWU2hUK/KMvHp2rGdfm9DtVIFAlw40oMACgkQ2rGdfm9D tVIt6w//YCX55pUgnakyxl8AEZJg8IeJW725Pj9QA04LY0CaNZ/uRhxvw4IaOTUq svXR3RxqEd+B/GMo5WIokxdlPtovU3tbccda3VX14LXKW7J9KMSR5cMdoq7pxCKX SuvmDdgU9lF2AiSBF7+46DohL7ENd67wPFswwCcVBfPfNVX7RucfmnXMGZwhiTFF fgNjRxsCS4DOVj7Ps9rblhIk3PmSKglTiTu83H9mx3h5AmF5Rd3Rsf9dy2mSYevp 0NWojWI6+6y2nV4gA9KIo5lW2RutlClpLAmxUMhiQWlQLka2ZUbUI6AlCDwmNnqz iyW0QtLNvnSvfgTcbG6gmaHGn5YKCGRB+FZuWLV7igwJLfr7f2lzZgtU2BXZaGnl ys6+Ul2x+I0E/ZfqpBcfu0G3lSpTiMLmCRNBSzkEbZjqn/n05cvuHVGUEEELWBq7 foyg/g5rkjhqEPoSJqaVIn1ngRyMRvAcRdOgOCmn6sidSs21QsZprh4nBGqcio2y dt0DSaDSvZZoFaJJwIFT2XHOGUy2X30/CCMb67JrNLav6u4fIYPk1bSUL4YEgjoY 1n5tfDv/Fpif1JMscsQvryM4XegLkjTAq/fRx4QmB1PWuqVktlTDZnuGNEo3o0kD MdBnYUPp51nMlL60JsVoZF+36VOU2QvrLuLxTN8uKxh1YOtR0ck= =p1Hy -----END PGP SIGNATURE----- --zp7lkj5ihh2r6cwq--