Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp798759imw; Thu, 14 Jul 2022 10:58:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vArPKCpw30LisEu39Fdmh+8OQfTAwmX++yplEHuAU7oAdaWFpSDqeqZDyK/kXCgOZzHh9t X-Received: by 2002:a17:90a:930b:b0:1ed:5441:1fff with SMTP id p11-20020a17090a930b00b001ed54411fffmr11113732pjo.238.1657821526623; Thu, 14 Jul 2022 10:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657821526; cv=none; d=google.com; s=arc-20160816; b=noba8raTCWSZkTGc08zyS6rya/Ko4P4t1ES1pKUNeuApS2DE9I6e324Q+BQlWHnx+y wUtmruck/bSI1ruTGC1BN40SDxpGI1khpPGkh1RTGJm7Se5Nf0w0dosHQNV6uJIsjZyP ERmnbJNxXbjoNxn+JAoOingIAjogaKb5J8x9Qu/LatPoFnUoNL8cfp7KCW5l01deKFxm Nyy0Qjd/IXFRiMTXmu2SFaha+yNy6SQ8C9nYOnKA0MOX8VaMrS+z3e+gnpm2y0V196cN dBIUYcw1oyLHASNRX0CRqyBMCCE2fcCzGGuBvrNddh6LKXUKiKG8EsKVtU9AAqu9KbzI ir9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=w2WFCuwnVuVTVff7KbKqbCluWBef5dmDH3t5aGQpu50=; b=v0lhFhGszDsz0m4zmVZ7lH+XGJniJRoCcwfZaoZb+K/R3QnoRWctClEtAhltfSXLMi 5iQCqQVCu8ShMRhuq9tSWQ/jmUk4ssVfg0wBLAozvpiHWbiskP8X8uDYz664IQnTWFbA 72o42jx771KWbisi8KS9GSUzt67Bg0HXNzuXC8ZWYd5gns/Lflx7/pHSAw3CeFlX2MFQ qMOFbPUEf+BlAgfUT+JGjecnFv2mi0Yw938NJ++NQu0dfcdYdtkzTALtWu86pDAqJ1Ac oW79j3XUK5k4jujwEjBL81LB+l1MdUC5xmITU4aN3LyMGnoAnBfXLPrnmZ/bS6CgvAb5 fsdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=UqczR9uP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw28-20020a056a00451c00b0052b0e52e1e4si2931111pfb.2.2022.07.14.10.58.31; Thu, 14 Jul 2022 10:58:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=UqczR9uP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239746AbiGNRjt (ORCPT + 99 others); Thu, 14 Jul 2022 13:39:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232679AbiGNRjr (ORCPT ); Thu, 14 Jul 2022 13:39:47 -0400 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1991549B69 for ; Thu, 14 Jul 2022 10:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=w2WFCuwnVuVTVff7KbKqbCluWBef5dmDH3t5aGQpu50=; b=UqczR9uP/0yaouEcmvW+DqqmerlDGA1gaU0AwesrCWv0btgKWxZdYGAr A/ZKAB+gcYyM4dT2WfMFewNmZdfdrHnK8abyjlWY8M6adITwNZrqABKPd upGwINbPzqZ1cbzl6zT52tO5jsOjVhR6YGzhaYY+IaeXeUJ8+PioFAj1V 8=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.92,272,1650924000"; d="scan'208";a="19356322" Received: from 150.122.68.85.rev.sfr.net (HELO hadrien) ([85.68.122.150]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 19:39:43 +0200 Date: Thu, 14 Jul 2022 19:39:43 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Steven Rostedt cc: LKML , Rasmus Villemoes , Michal Marek , Peter Zijlstra Subject: Re: [PATCH] coccinelle: Remove script that checks replacing 0/1 with false/true in functions returning bool In-Reply-To: <20220711164243.092eec75@gandalf.local.home> Message-ID: References: <20220711164243.092eec75@gandalf.local.home> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jul 2022, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > There is nothing wrong with current code that returns 0 or 1 for a > function returning bool. It is perfectly acceptable by the C standard. > > To avoid churn of unwanted patches that are constantly sent to maintainers > who do not care about this change, remove the script that flags it as an > issue. This issue is not worth the burden on maintainers to accept > useless patches. Applied. julia > > Link: https://lore.kernel.org/all/20220705073822.7276-1-jiapeng.chong@linux.alibaba.com/ > Link: https://lore.kernel.org/all/20220429075201.68581-1-jiapeng.chong@linux.alibaba.com/ > Link: https://lore.kernel.org/all/1649236467-29390-1-git-send-email-baihaowen@meizu.com/ > Link: https://lore.kernel.org/all/20220317014740.3138-1-jiapeng.chong@linux.alibaba.com/ > Link: https://lore.kernel.org/all/190b5c2f2f2fb9cc775fce8daed72bf893be48a4.1642065293.git.davidcomponentone@gmail.com/ > Link: https://lore.kernel.org/all/20211214113845.439392-1-deng.changcheng@zte.com.cn/ > Link: https://lore.kernel.org/all/20210824065735.60660-1-deng.changcheng@zte.com.cn/ > Link: https://lore.kernel.org/all/20210824064305.60081-1-deng.changcheng@zte.com.cn/ > Link: https://lore.kernel.org/all/20210824062359.59474-1-deng.changcheng@zte.com.cn/ > > Cc: Rasmus Villemoes > Cc: Julia Lawall > Cc: Michal Marek > Cc: Peter Zijlstra > Signed-off-by: Steven Rostedt (Google) > --- > scripts/coccinelle/misc/boolreturn.cocci | 59 ------------------------ > 1 file changed, 59 deletions(-) > delete mode 100644 scripts/coccinelle/misc/boolreturn.cocci > > diff --git a/scripts/coccinelle/misc/boolreturn.cocci b/scripts/coccinelle/misc/boolreturn.cocci > deleted file mode 100644 > index 29d2bf41e95d..000000000000 > --- a/scripts/coccinelle/misc/boolreturn.cocci > +++ /dev/null > @@ -1,59 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/// Return statements in functions returning bool should use > -/// true/false instead of 1/0. > -// > -// Confidence: High > -// Options: --no-includes --include-headers > - > -virtual patch > -virtual report > -virtual context > - > -@r1 depends on patch@ > -identifier fn; > -typedef bool; > -symbol false; > -symbol true; > -@@ > - > -bool fn ( ... ) > -{ > -<... > -return > -( > -- 0 > -+ false > -| > -- 1 > -+ true > -) > - ; > -...> > -} > - > -@r2 depends on report || context@ > -identifier fn; > -position p; > -@@ > - > -bool fn ( ... ) > -{ > -<... > -return > -( > -* 0@p > -| > -* 1@p > -) > - ; > -...> > -} > - > - > -@script:python depends on report@ > -p << r2.p; > -fn << r2.fn; > -@@ > - > -msg = "WARNING: return of 0/1 in function '%s' with return type bool" % fn > -coccilib.report.print_report(p[0], msg) > -- > 2.35.1 > >