From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: Subject: [PATCH] [PATCH] time: tick-sched: use bool for tick_stopped Date: Tue, 10 Apr 2018 18:30:17 +0200 Message-ID: <20180410163017.GH4082@hirez.programming.kicks-ass.net> References: <891d4f632fbff5052e11f2d0b6fac35d@codeaurora.org> <20180410123305.GF4082@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Joe Perches Cc: "Rafael J. Wysocki" , yuankuiz@codeaurora.org, Linux PM , "Rafael J. Wysocki" , Frederic Weisbecker , Thomas Gleixner , aulmck@linux.vnet.ibm.com, Ingo Molnar , Len Brown , Linux Kernel Mailing List , apw@canonical.com List-Id: linux-pm@vger.kernel.org On Tue, Apr 10, 2018 at 08:14:54AM -0700, Joe Perches wrote: > Whinging about bool : seems entirely sensible > and straightforward to do. > > I'm not so sure about bool in structs as a patch context > could be adding a bool to local stack definitions and > there's no real ability to determine if the bool is in a > struct or on the stack. > > Also, I think there's nothing really wrong with using > bool in structs. Steven Rostedt's rationale in > https://lkml.org/lkml/2017/11/21/207 isn't really right > as sizeof(int) is 4 not 1 and sizeof(bool) is 1 on arches > without alignment issues. I believe when using gcc, > sizeof(bool) is always 1 and there may be alignment padding > added on some arches. Dunno. C std simply does not define sizeof(_Bool) and leaves it up to architecture ABI, therefore I refuse to use _Bool in composite types, because I care about layout. Also, not all architectures can do byte addressing, see Alpha But I think the battle is already lost anyway. > > git grep -P '(? 1543 Yes I know, doesn't mean we shouldn't discourage it for new code; also Linus.