From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbeDJQab (ORCPT ); Tue, 10 Apr 2018 12:30:31 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50892 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbeDJQaa (ORCPT ); Tue, 10 Apr 2018 12:30:30 -0400 Date: Tue, 10 Apr 2018 18:30:17 +0200 From: Peter Zijlstra 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 Subject: Re: Subject: [PATCH] [PATCH] time: tick-sched: use bool for tick_stopped 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.