Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1149124ybg; Fri, 18 Oct 2019 12:50:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJoOK+OlXrwAiD/xbxQjMOe+SFW6BEE+vvR9PuxT7SkOU+wSop7f2heLoeQDWS4PzTb7ZK X-Received: by 2002:a17:906:7e49:: with SMTP id z9mr10289867ejr.315.1571428234898; Fri, 18 Oct 2019 12:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571428234; cv=none; d=google.com; s=arc-20160816; b=DitzoHtCUoqYDWkVL77asQqcZE1gUEmtrhMbilNaDdVHttvHDP9IWO2r5VYG0MyUmc bD19OjDDJ+YR6BeP32pw8zbivfZySKYBvBYIbC3PSHK/B1BACSw498DwZAY+jq/93vGB pWWxjnE+1gdNWlM2OGJKQsw1j7KE5NNCWhW+1h8GidAeVxMOY8LKwThNB4s0653cIwTD WDAdK7YAmwJsqpw5j2V8dhaJzEy3osjK8Y0E5sG3tenXvV07QjsGmPD700oCsy0h2lQB rCRIUzC4Bu9toofjzQmSie7ZWOXTzI1LV2k7WRuZBkdDq8SaLKaTPpoDYpFXAQqvK5zx 80xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=mbWWXVxdrMHPgpX7m1KEqFIlfVcFojehtfcDn/bZQsE=; b=TFai8ziA6wueQ907qQrQOSRVJbo3c+hrBGeNtF8fkOh9MwYvaLlm3yh7thEaXmiDap JmR3ZqzlUNp+bQ4mKMmtSPe1Dku5ho8Id9v5hAlvGFSvWECjS55x8ONuRjwMyX0/cEVA 4rHiCe7lj3UVfNLxlWJRtqkjHvcrmhZhTgLLp/U7+VcqMzjP0utVdyr0yPZz3EvUwt9o btEUwsQkMROGG1Vo15juxZvxzByxdNA9NvE/yX07ClG7a9im4TZFYfSTh7kOUAq3iB+X j4eJCZb4kj9Q9fkTX+opuwTUTGXTW4bS5fBkKKQLCrP4y7lGIHhx3s4r04M/R7a6kSHb 3KCA== 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 w6si4320752eda.336.2019.10.18.12.50.11; Fri, 18 Oct 2019 12:50:34 -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 S2440317AbfJQOeh (ORCPT + 99 others); Thu, 17 Oct 2019 10:34:37 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:9921 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbfJQOeh (ORCPT ); Thu, 17 Oct 2019 10:34:37 -0400 X-IronPort-AV: E=Sophos;i="5.67,308,1566856800"; d="scan'208";a="323053838" Received: from portablejulia.rsr.lip6.fr ([132.227.76.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 16:34:34 +0200 Date: Thu, 17 Oct 2019 16:34:33 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: Alexandre Belloni cc: Himanshu Jha , Linus Torvalds , kernel-janitors@vger.kernel.org, Arnd Bergmann , tglx@linutronix.de, Marc Zyngier , linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com Subject: Re: [PATCH] coccinelle: api/devm_platform_ioremap_resource: remove useless script In-Reply-To: <20191017142237.9734-1-alexandre.belloni@bootlin.com> Message-ID: References: <20191017142237.9734-1-alexandre.belloni@bootlin.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Oct 2019, Alexandre Belloni wrote: > 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. OK. Acked-by: Julia Lawall > > 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 > >