Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6990202imu; Mon, 3 Dec 2018 06:08:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/U0UqYfq82Niu37LOP2bnZ92j4Ldn6LjhN6z7xLLxBJ8mDP1EbdMWEtxSZz2rtdfxUT8S6u X-Received: by 2002:a62:670f:: with SMTP id b15mr15961245pfc.212.1543846120941; Mon, 03 Dec 2018 06:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543846120; cv=none; d=google.com; s=arc-20160816; b=BvPQVpwLw7AXXGjYP37IEl8mgPYp11lJ6R0l1sRHV+fxltPRfP+PZUFM/wDPUSX1Sj XRAfq9xmRF+9FqvkRmZGh+f1GGpz0SHz81y2tpz3R6n69UUDP6qrB423/C4k6Ja2SPsx K03PLCz1eaWf2aD46q6ZegqGF5K8LpGuHZOc71HvuZ17hc4nVJGIfyu9fPCTPpkenb/O EG/HNfTg5wc9/VRT3IBcY4JcwZnw5ljO28SxFjvYJQHx+Qtdmj4Je2dIEMHoKZmZBhHp m33GM979iylVf+6m2Jc5KKuds4dlangnuOLWc4PBQjba8iEtrVBKJAx2ZrSU9IBPiZXT 0M6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=exvbNzvCjq3AbXXfdCBZTw/JWeFViQwPJONeGMJGdIY=; b=ptoYt2irMbDrJcpB16sPP2kSQArT8VawRu4k9hJeS8JnNfSOw+sr7o64B4CJ9XHQLC Leol654qUFnYTV45pS0PKjOIrPING0lB9Aix+6LN63EBdzSym1oGuRU2YzutlQOKfOjr 9dwH8QTvM8CwFhk+Tu7oziJzL3vet2fXVoT1+hLhVrh/SWB4NnhlTKJfcMTEPzs2QgWs td5+lalzsvn2oTPwNfcQxvEVc+gm+uURNZN5JiY4YGwwC0FR390vCab6Dwl/ap9BA53U RJlJJFz33RQ/gpStJx0/3zTZRG5YD6Ktq2YJqVlEVdUMdybBCzButnMa1yosMmGIa3gz /USQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x141si12449616pgx.266.2018.12.03.06.08.14; Mon, 03 Dec 2018 06:08:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726549AbeLCOIW (ORCPT + 99 others); Mon, 3 Dec 2018 09:08:22 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:51244 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbeLCOIV (ORCPT ); Mon, 3 Dec 2018 09:08:21 -0500 X-IronPort-AV: E=Sophos;i="5.56,310,1539640800"; d="scan'208";a="358492938" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2018 15:07:11 +0100 Date: Mon, 3 Dec 2018 15:07:07 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Peter Zijlstra cc: "Paul E. McKenney" , Wen Yang , Davidlohr Bueso , Josh Triplett , linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, mingo@redhat.com, will.deacon@arm.com Subject: Re: [PATCH] locktorture: Fix assignment of boolean variables In-Reply-To: <20181203105045.GD11573@hirez.programming.kicks-ass.net> Message-ID: References: <20181201083149.36972-1-wen.yang99@zte.com.cn> <20181201203700.GW4170@linux.ibm.com> <20181203083500.GH11614@hirez.programming.kicks-ass.net> <20181203084605.GC11650@hirez.programming.kicks-ass.net> <20181203105045.GD11573@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Dec 2018, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 10:20:42AM +0100, Julia Lawall wrote: > > Personally, I would prefer that assignments involving boolean variables > > use true or false. It seems more readable. Potentially better for tools > > as well. > > Then those tools are broken per the C spec. > > > But if the community really prefers 0 and 1, then the test can > > be deleted. > > The C language spec, specifies _Bool as an integer type wide enough to > at least store 0 and 1. > > IOW, 0 and 1 are perfectly valid valus to assign to a _Bool. > > And fundamentally that has to be so. That's how computers work. 0 is > false, 1 is true. > > The kernel is not the place to try and abstract such stuff, C is our > portable assembler. We muck with hardware, we'd better know how the heck > it works. How about it it were suggested only in files that already use true and false somewhere? julia