From patchwork Tue Nov 19 17:28:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 179781 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp984252ilf; Tue, 19 Nov 2019 10:04:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzOwfKA0B4IyYLiJ3x2ax7ucJKlTAPfCR8ohJNaykcsy6On8edDKEaEAHzKj6Fu7NbvKWDW X-Received: by 2002:a1c:7214:: with SMTP id n20mr7219829wmc.126.1574186651082; Tue, 19 Nov 2019 10:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574186651; cv=none; d=google.com; s=arc-20160816; b=Q2kmRelPWoCjgIZkasOIdy2JBP9Mpi+I3ETh/0kftGtM3GiUiS2qQFrESz0swhU9/F Fbrilrwdxhq39sb1gqynAjpBIMYA0IBnjJ3n8iEXsErFPvKlLgw8C4dYeoMtkpP7r+v2 b1satsLh0IoSPAcfN0fof1sBpyA6tSxQSQMMdZWYbE8NTKS6i28UQt4/gd8PfTM1Jdgb of+896ZoiDrtGw6sLBcgXUoxHvey0pYRHOq+JHVStiO6QNLTQmjve131AN0gAzKnXR1V bueVI650eyUfTsA8ZqCb3AQ1ESXy+jOMY1Ejgsa3irpEBMZtViomsAAqGjc0gd/xvZlB IIpw== 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=7BuJNsLBIXhUJtuTF4CGdofRqL0/A7vGupygBPSF1ks=; b=KJhJY71IMPsedxqOM3Ev12x8xezAtwJpDWejfhiOlBnGXgDfxj8MJYuMD1iVATGsYw 6jo8bTF4qF0fdJ9FApCqWGS1M7A0NdZ9TDrDtZtqlKPnFM1DmB2z2girFk2djtFVbMAp ez3flWxOR9B2jGz1h53h8tuYIoTY3KkDevLaZ5juF7M+yfJHmtcxFO8UzTxtm9xm5vIt TclTZdVrFdtI9lHgAmZv349pzm9zFW+ArtOZC3svAU4CEMKwTZGvHCHfz9V0E/4AkD9w Uhm5Ji/wFgcXlSXwJPbtAw+t9uTi5Zxw4MxNj3cB8innTpQ6CyKTuQFuU4jfQeDXmie5 IdLg== 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 z16si15392968edx.337.2019.11.19.10.04.10; Tue, 19 Nov 2019 10:04:11 -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 S1727368AbfKSSEJ (ORCPT + 26 others); Tue, 19 Nov 2019 13:04:09 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:4369 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727222AbfKSSEH (ORCPT ); Tue, 19 Nov 2019 13:04:07 -0500 X-IronPort-AV: E=Sophos;i="5.69,218,1571695200"; d="scan'208";a="412559099" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 19 Nov 2019 19:04:02 +0100 From: Julia Lawall To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Masahiro Yamada , Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] coccinelle: platform_get_irq: drop unneeded metavariable Date: Tue, 19 Nov 2019 18:28:20 +0100 Message-Id: <1574184500-29870-5-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1574184500-29870-1-git-send-email-Julia.Lawall@lip6.fr> References: <1574184500-29870-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 From: Masahiro Yamada Having E as a metavariable adds the requirement to verify its type. This seems like an unnecessary constraint, so drop it. There is currently no impact on the set of results. Signed-off-by: Julia Lawall --- scripts/coccinelle/api/platform_get_irq.cocci | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/coccinelle/api/platform_get_irq.cocci b/scripts/coccinelle/api/platform_get_irq.cocci index e5d04fb..17e5895 100644 --- a/scripts/coccinelle/api/platform_get_irq.cocci +++ b/scripts/coccinelle/api/platform_get_irq.cocci @@ -11,7 +11,6 @@ virtual report @depends on context@ expression ret; -struct platform_device *E; @@ ret = @@ -19,7 +18,7 @@ ret = platform_get_irq | platform_get_irq_byname -)(E, ...); +)(...); if ( \( ret < 0 \| ret <= 0 \) ) { @@ -30,7 +29,6 @@ if ( \( ret < 0 \| ret <= 0 \) ) @depends on patch@ expression ret; -struct platform_device *E; statement S; @@ @@ -39,7 +37,7 @@ ret = platform_get_irq | platform_get_irq_byname -)(E, ...); +)(...); if ( \( ret < 0 \| ret <= 0 \) ) -{ @@ -49,7 +47,6 @@ S @depends on patch@ expression ret; -struct platform_device *E; @@ ret = @@ -57,7 +54,7 @@ ret = platform_get_irq | platform_get_irq_byname -)(E, ...); +)(...); if ( \( ret < 0 \| ret <= 0 \) ) { @@ -76,7 +73,6 @@ if ( \( ret < 0 \| ret <= 0 \) ) @r depends on org || report@ position p1; expression ret; -struct platform_device *E; @@ ret = @@ -84,7 +80,7 @@ ret = platform_get_irq | platform_get_irq_byname -)(E, ...); +)(...); if ( \( ret < 0 \| ret <= 0 \) ) {