Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1141611ybg; Fri, 18 Oct 2019 12:42:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWVfiCXSNCPsRROB2xUUUXDRwUbfTDglok5zud0R+WSEsnkiKqa8mwwc0rZINTUa4gzz+5 X-Received: by 2002:a05:6402:68f:: with SMTP id f15mr11398225edy.170.1571427760303; Fri, 18 Oct 2019 12:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571427760; cv=none; d=google.com; s=arc-20160816; b=ZLoPJM8h4u4o4XRR8tbJdUOpZXf60GfIYw0rYA0aAfIW1P6DcbtVb8OFdbnOHcr4Qp mLbuz6TUe12E7kiUUI+XtXNMlwmlp3WZMZWNY2xsZCVtJDEo2ZZs+oXsl+9mMeE6H2Jt RY1Db6evHVcOc5VoP7Uc+QNO+UrJ6hcjPCZ6xoEiD792n7DnptNBYQTL2C6MI5OyNR7n oATJfSJI/mgkS3XU1rtPe3dBqh3X/zEU1rA2kVET6glZ7CTdTZsH5m63ymvjAxfYktGl rByH6o0ZOYYSseWiUO7+L5/bz240x+Pj2GG37nGudDIwEXKbltgwoxBBfFyY6H4Ar9UI DM0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=whwaX2yU9zOvKmkq6PPpI2nVAMWcxSrbmbwbQrH+qwU=; b=Gwem4/EeDDMgOEkrY9KPVZFpADqHhz9NOYlIONWDeXHjAfDYI1WCiQiMM5WmnbuVJQ rFxj69wbjAmKptUJOFNWtmbEjixacgbZjiWSNQuk3FGyv8iAHv/CI4Z6shlsXde1NFmP CGu0ak+NkE5l1IE665laESJlA3lg4HgF3i3Z04l0gxp3XdIx4QquLnNOmwSREWBEfpip lQkLAYvpR4g2eOWVWcnFCgFYfUcZEL18YIzXsLOpCy9pIeAkTPZA25A6UcdwASaEU8fR PqlRPglHrJEfcRx5RxKf9l8kqQFMhYUGGMtOxV3C6UNsaxcqdZA9o3JrcTQmjJXdBPOU NIqg== 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 u17si4281607edy.145.2019.10.18.12.42.17; Fri, 18 Oct 2019 12:42:40 -0700 (PDT) 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 S2440291AbfJQOWs (ORCPT + 99 others); Thu, 17 Oct 2019 10:22:48 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:35601 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437756AbfJQOWr (ORCPT ); Thu, 17 Oct 2019 10:22:47 -0400 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 52B4A10000C; Thu, 17 Oct 2019 14:22:45 +0000 (UTC) From: Alexandre Belloni To: Julia Lawall Cc: Himanshu Jha , Linus Torvalds , kernel-janitors@vger.kernel.org, Arnd Bergmann , tglx@linutronix.de, Marc Zyngier , linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH] coccinelle: api/devm_platform_ioremap_resource: remove useless script Date: Thu, 17 Oct 2019 16:22:37 +0200 Message-Id: <20191017142237.9734-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While it is useful for new drivers to use devm_platform_ioremap_resource, this script is currently used to spam maintainers, often updating very old drivers. The net benefit is the removal of 2 lines of code in the driver but the review load for the maintainers is huge. As of now, more that 560 patches have been sent, some of them obviously broken, as in: https://lore.kernel.org/lkml/9bbcce19c777583815c92ce3c2ff2586@www.loen.fr/ Remove the script to reduce the spam. Signed-off-by: Alexandre Belloni --- .../api/devm_platform_ioremap_resource.cocci | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 scripts/coccinelle/api/devm_platform_ioremap_resource.cocci diff --git a/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci b/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci deleted file mode 100644 index 56a2e261d61d..000000000000 --- a/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/// Use devm_platform_ioremap_resource helper which wraps -/// platform_get_resource() and devm_ioremap_resource() together. -/// -// Confidence: High -// Copyright: (C) 2019 Himanshu Jha GPLv2. -// Copyright: (C) 2019 Julia Lawall, Inria/LIP6. GPLv2. -// Keywords: platform_get_resource, devm_ioremap_resource, -// Keywords: devm_platform_ioremap_resource - -virtual patch -virtual report - -@r depends on patch && !report@ -expression e1, e2, arg1, arg2, arg3; -identifier id; -@@ - -( -- id = platform_get_resource(arg1, IORESOURCE_MEM, arg2); -| -- struct resource *id = platform_get_resource(arg1, IORESOURCE_MEM, arg2); -) - ... when != id -- e1 = devm_ioremap_resource(arg3, id); -+ e1 = devm_platform_ioremap_resource(arg1, arg2); - ... when != id -? id = e2 - -@r1 depends on patch && !report@ -identifier r.id; -type T; -@@ - -- T *id; - ...when != id - -@r2 depends on report && !patch@ -identifier id; -expression e1, e2, arg1, arg2, arg3; -position j0; -@@ - -( - id = platform_get_resource(arg1, IORESOURCE_MEM, arg2); -| - struct resource *id = platform_get_resource(arg1, IORESOURCE_MEM, arg2); -) - ... when != id - e1@j0 = devm_ioremap_resource(arg3, id); - ... when != id -? id = e2 - -@script:python depends on report && !patch@ -e1 << r2.e1; -j0 << r2.j0; -@@ - -msg = "WARNING: Use devm_platform_ioremap_resource for %s" % (e1) -coccilib.report.print_report(j0[0], msg) -- 2.21.0