Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1794730imu; Wed, 12 Dec 2018 04:34:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/UPopnjL59y4hhpQXmBmcc/7E5YhUrFr5UAGCUOQZA6eoPVPjIROVxRlZyGD8YZR8AzYd9A X-Received: by 2002:a63:c051:: with SMTP id z17mr17795108pgi.20.1544618047702; Wed, 12 Dec 2018 04:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544618047; cv=none; d=google.com; s=arc-20160816; b=awiYYu6xSC/1tps3EKPrjjIiWQ/a80719NyIFZ1bAR+tJknUY2hCIxkhPAbhYBecfD x0eXX/y0+N25+4mW+bKkBWnTfFRBacnpVApYGh1/InmKKwVM+J4411YqIwV6Cp9hbL84 tru+99UTd1aF8t4WO7bwsTxX7j801Q4Bif+Z8Q4KjWmExIE9cu87dHLuKoqze6bw3oJp 34QgC6nR8ShvVXQRQMUsVq2f+jDy3iixEeRLnszbDBods0UWtZLLDnWoQgpBnschJtPl IvVlPUGXymu9ko51v1MhZvSAFXYe08Zkilvkf3LerpEIw/Swrb2fsDxscQjde3ZeYaow q2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=RkQIItQ12SAgr/bNq8c8ZHfO/OAkvEkdPhk7JQk8jeE=; b=rmVCD/cNsXh/pFQi6VNbAQXTwXnV6pGnyniyqmwZxpOGXQPgeTe4cnJ2n1dC8kpewt tK7JOr/C7r7gay9rbiOa10YfI8wsF7DM3VwDeIlU2Q+Cb5ev9V7vhOE8VsEkfuiABa/M zn82K2TsioXWbp/K1iKBawgPi6grLilqQEabWZ7vChPKUIZhp/ytW++D+TloXMBG8rp7 w3I3XrSvoJbfUq9XaIJ/PBTdS4uVHLUziPTKPT42SkpOj6avulcPBPS/DQnT4OpSSpdp jvxLetperfUvhvywjnmZ2AvkQ4yk3CpTRxY1kLSZn1qLB+fHAA/NFwQrm+3aCZhqEe61 Kqlw== 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 5si15490175plx.391.2018.12.12.04.33.52; Wed, 12 Dec 2018 04:34:07 -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 S1727492AbeLLMch (ORCPT + 99 others); Wed, 12 Dec 2018 07:32:37 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21783 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727155AbeLLMcZ (ORCPT ); Wed, 12 Dec 2018 07:32:25 -0500 X-IronPort-AV: E=Sophos;i="5.56,344,1539640800"; d="scan'208";a="359976181" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 12 Dec 2018 13:32:22 +0100 From: Julia Lawall To: Julia Lawall Cc: Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Masahiro Yamada , Peter Zijlstra , "Paul E . McKenney" Subject: [PATCH 2/2] scripts: coccinelle: Correct warning message Date: Wed, 12 Dec 2018 12:55:57 +0100 Message-Id: <1544615757-19356-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544615757-19356-1-git-send-email-Julia.Lawall@lip6.fr> References: <1544615757-19356-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Assignment" requires the assigned value before the place that value is stored into. Signed-off-by: Julia Lawall --- scripts/coccinelle/misc/boolinit.cocci | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/misc/boolinit.cocci index 1b44feb..b0584a3 100644 --- a/scripts/coccinelle/misc/boolinit.cocci +++ b/scripts/coccinelle/misc/boolinit.cocci @@ -150,19 +150,19 @@ cocci.print_main("WARNING: Comparison to bool",p) p << r2.p; @@ -cocci.print_main("WARNING: Comparison of bool to 0/1",p) +cocci.print_main("WARNING: Comparison of 0/1 to bool variable",p) @script:python depends on org@ p1 << r3.p1; @@ -cocci.print_main("WARNING: Assignment of bool to 0/1",p1) +cocci.print_main("WARNING: Assignment of 0/1 to bool variable",p1) @script:python depends on org@ p2 << r4.p2; @@ -cocci.print_main("ERROR: Assignment of bool to non-0/1 constant",p2) +cocci.print_main("ERROR: Assignment of non-0/1 constant to bool variable",p2) @script:python depends on report@ p << r1.p; @@ -174,16 +174,16 @@ coccilib.report.print_report(p[0],"WARNING: Comparison to bool") p << r2.p; @@ -coccilib.report.print_report(p[0],"WARNING: Comparison of bool to 0/1") +coccilib.report.print_report(p[0],"WARNING: Comparison of 0/1 to bool variable") @script:python depends on report@ p1 << r3.p1; @@ -coccilib.report.print_report(p1[0],"WARNING: Assignment of bool to 0/1") +coccilib.report.print_report(p1[0],"WARNING: Assignment of 0/1 to bool variable") @script:python depends on report@ p2 << r4.p2; @@ -coccilib.report.print_report(p2[0],"ERROR: Assignment of bool to non-0/1 constant") +coccilib.report.print_report(p2[0],"ERROR: Assignment of non-0/1 constant to bool variable") -- 1.9.1