From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423589AbcFHJNA (ORCPT ); Wed, 8 Jun 2016 05:13:00 -0400 Received: from terminus.zytor.com ([198.137.202.10]:55134 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423268AbcFHJM5 (ORCPT ); Wed, 8 Jun 2016 05:12:57 -0400 Subject: Re: [PATCH 02/10] x86, asm: use bool for bitops and other assembly outputs To: Ingo Molnar References: <1465342269-492350-1-git-send-email-hpa@linux.intel.com> <1465342269-492350-3-git-send-email-hpa@linux.intel.com> <20160608074956.GO30154@twins.programming.kicks-ass.net> <20160608082835.GB9645@gmail.com> <20160608083340.GC9645@gmail.com> <02ee64ce-257a-ba93-1f49-6877f5e4f6db@zytor.com> <20160608090111.GA11390@gmail.com> Cc: Peter Zijlstra , "H. Peter Anvin" , Thomas Gleixner , Linux Kernel Mailing List , Andy Lutomirski , Borislav Petkov From: "H. Peter Anvin" Message-ID: <88387994-fbf1-83dd-d58d-343498776a11@zytor.com> Date: Wed, 8 Jun 2016 02:12:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160608090111.GA11390@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/08/16 02:01, Ingo Molnar wrote: > > That's a divergence with an underlying reason - but not harmonizing the return > code is an unforced error AFAICS and can be fixed. > Perhaps. It is also no real question that "bool" is the right return type for a single bit. Changing that in all architectures at one time is a major undertaking, however, and it seems to me that it would be better to leave that to the respective architecture maintainers. Perhaps I'm wrong, but I'd really like to avoid the upcasting to "int" which isn't needed, because in my testing I find that it definitely encourages gcc to generate poor code. -hpa