Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8854452imu; Sat, 29 Dec 2018 05:15:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7JV+3Mvg7563EpXYBYyRm1utE2pcZ3/cNR44sZnFeCdDzCxKO0+1sCE9oEuWx9JUsEiA6Z X-Received: by 2002:a17:902:9887:: with SMTP id s7mr30365512plp.199.1546089358191; Sat, 29 Dec 2018 05:15:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546089358; cv=none; d=google.com; s=arc-20160816; b=ByPgnMt0o+nq+Us5iCMkcWauYrbAGzZLl5d/KR0v0BlyRldaE/0u7vs7zQT2eFUGkZ DaD6qHhHrLLlnaaHLb7diBnFHErThUoWRy4kdngufrNni7JF0lWJ+QZ8oU4Y+DL/KPxt 9U7XKIOt8Dg38ZyRHRlzqRqCf6OSsfdZZoqYs9ewYejNGR5AS3E9tmFnq2uKf/qrkAoW p1mvfOrCOu4FlclaKlw4B/Eussy0rTGieEzvnOl8OdK63zPkkmbuOdKkiIgb4UCq+2Me f+Lkh5tTdaEEbm0uW8KwrHWLmVqxild/id3BeHyjQrRU08ZI9Oxg44d2N90RgIRUclwW TReA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=WSMxkssaQPhyYIw1y+Omdvv7jOH34nFGtdKJ39VfXdQ=; b=R7j+Eebwfh9atBtY1EEvv0i/UD24llhLtndGmSSrbwHXZ7KEpr5Cthu82KDwEqqRNf Glh8pS1IC1csfPNiBYh5KXIcZ3SSZkhIMxnPQn0R7oT9ouLII2bMQDpTRnWeV4mu4aui yEIHpyd+2JBK1NyzrqaBDf7jvVc91cf/AySahkPljJMIdDjhvGshXU8RwoQCGmBO1van hXlZBjJyryXMUayvb0qo/Zxohquq0lwKXtNj7/ffNBx/lXC6ZmJMpIgs/buvuTJ+Ok+H jfI65KBSFg9GjhyQ03FA0TjCoxRzJSn45RYr5wSCyf4KX1cHIJgo4XDiN8kgZeLDCE2x ArzA== 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 q18si39061169pls.30.2018.12.29.05.15.43; Sat, 29 Dec 2018 05:15:58 -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 S1728953AbeL2GvH (ORCPT + 99 others); Sat, 29 Dec 2018 01:51:07 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:20417 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728933AbeL2GvG (ORCPT ); Sat, 29 Dec 2018 01:51:06 -0500 X-IronPort-AV: E=Sophos;i="5.56,412,1539640800"; d="scan'208";a="290374218" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 29 Dec 2018 07:51:03 +0100 From: Julia Lawall To: Masahiro Yamada Cc: kernel-janitors@vger.kernel.org, Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Pierre-Louis Bossart Subject: [PATCH] scripts: coccinelle: boolinit: drop warnings on named constants Date: Sat, 29 Dec 2018 07:14:16 +0100 Message-Id: <1546064056-15569-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coccinelle doesn't always have access to the values of named (#define) constants, and they may likely often be bound to true and false values anyway, resulting in false positives. So stop warning about them. Signed-off-by: Julia Lawall --- scripts/coccinelle/misc/boolinit.cocci | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/misc/boolinit.cocci index b0584a3..aabb581 100644 --- a/scripts/coccinelle/misc/boolinit.cocci +++ b/scripts/coccinelle/misc/boolinit.cocci @@ -136,9 +136,14 @@ position p1; @r4 depends on !patch@ bool b; position p2; +identifier i; constant c != {0,1}; @@ +( + b = i +| *b@p2 = c +) @script:python depends on org@ p << r1.p;