Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6713691imu; Mon, 3 Dec 2018 01:22:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vs4/VWutqzbn4IpY9Ko+DywAxlLOlapTAmWJEQ1zIgK8EDx07TiT6/5hznlydncX3lMt1i X-Received: by 2002:a62:34c6:: with SMTP id b189mr15543208pfa.229.1543828944161; Mon, 03 Dec 2018 01:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543828944; cv=none; d=google.com; s=arc-20160816; b=w2k3hCgt7dtoOaVNgz+qRKBDmKruR/8lpP1wzE/Te/XqZQ3VqUrEfMf5vH2DA77E+t eKT7V98Ec8x6r6qNz0pGJRFTUQ4IqQWnvmUbKdpmpVh3NJ0XkTeLQ+mosTEaOCNieSHT HH9xjAoKdSv2drWRj8NShXykcEV9p9HZRTsLOM557a9KDGs36O1eKkVq6qskbcL8f5/1 gwxK+LAFa4K4hl7EgZRmoqd9YQhT7yQjTGg/Q42ex2yPEZ4/zRfD77KTxbllMYWRcpqQ 8hhBHFMCQpdJbSnmGULqDHEAYjbrT40wlfP+W5rTNL4YlStflVb09Cx2NoQhmMGpCy54 GUow== 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=m8nIwne4Vsy/qIMjFzbzotA8FT8/wxbpiOouhf19H1o=; b=yeYw7zuu4H5KQT+U8AcyNxnuBs/y2XHMg8sUgwTkW85N0sAF9J8qs3jLH8+kN4VMy9 vpFkksJeH8IsF2/V/kc92XATNcgCkgoHQotuYoRlmt4wBOWK3ndMzsh77wVCQxQxUbt8 oyFM2CbXpYT3ovWu3uXC+s8C8bemMP5lIVbPRdXXCxutN3OLewDOu0rbwmblSR3JF9gt HpQPSb6TGzoiI+83sKdXS9C7+JDswGjFbHcSwOcvt+CvPuOKPTjcp5PJg0GEvXl19UNF CgoLyP9ULB+gaS0eBdWP5dd/CkOPlck1QFzK4lUdhuZVqeo8QYXq7BeQudmiVZwXTbLH +1Xw== 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 p11si11627420pgb.219.2018.12.03.01.22.09; Mon, 03 Dec 2018 01:22:24 -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 S1726011AbeLCJVX (ORCPT + 99 others); Mon, 3 Dec 2018 04:21:23 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:47151 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbeLCJVX (ORCPT ); Mon, 3 Dec 2018 04:21:23 -0500 X-IronPort-AV: E=Sophos;i="5.56,310,1539640800"; d="scan'208";a="287622068" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2018 10:20:46 +0100 Date: Mon, 3 Dec 2018 10:20:42 +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, Julia.Lawall@lip6.fr Subject: Re: [PATCH] locktorture: Fix assignment of boolean variables In-Reply-To: <20181203084605.GC11650@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> 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 09:35:00AM +0100, Peter Zijlstra wrote: > > On Sat, Dec 01, 2018 at 12:37:01PM -0800, Paul E. McKenney wrote: > > > On Sat, Dec 01, 2018 at 04:31:49PM +0800, Wen Yang wrote: > > > > Fix the following warnings reported by coccinelle: > > > > > > > > kernel/locking/locktorture.c:703:6-10: WARNING: Assignment of bool to 0/1 > > Not to mention that WARN is gramatically incorrect. We're not assigning > 'bool' to 0/1 but the other way around. > > What crap.. > > > So I strongly disagree with this. Anybody that has trouble with 0/1 vs > > false/true needs to stay the heck away from C. > > > > I would suggest we delete that stupid coccinelle scripts that generates > > these pointless warns. Personally, I would prefer that assignments involving boolean variables use true or false. It seems more readable. Potentially better for tools as well. But if the community really prefers 0 and 1, then the test can be deleted. julia