Received: by 2002:a17:90a:37a3:0:0:0:0 with SMTP id v32csp741616pjb; Fri, 21 Jun 2019 07:53:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1QNMLXKyIDTvNVU0DL3JRnljrr0ed/fvuTYCK/jxdGXKuWYO9A2rBueR2MKIIeZnDOG4K X-Received: by 2002:a17:902:aa83:: with SMTP id d3mr107299513plr.74.1561128781585; Fri, 21 Jun 2019 07:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561128781; cv=none; d=google.com; s=arc-20160816; b=orW3q3G82PRFfI8OLGeAcvPJZcRmdg4ZsgY4DJdpXkAIuZ6PzmGl9b42c31YKXO741 U9UISa82FBfhxn4vcMcYqZIjyBX6q/gBzLAJsPFbhTJ9Z5hEvaPPzgC88eKdyDovo3kl rLZLTg/yuNEWNnV2CBQgW7UyKSSQOaTxwdSfKRHnlOyRLR+q0BYJQzHXXQkC8n6wFWtd xEUc7+XEsPcb0VjB4Dr/lMmN7S9kV5D9GBsXJ74yMsPftTtmEwVNwnwjqWaG2joXySaS QBaBuhCSXgU9qSmziVk7sRT1ulIDUnztM7vJ6MKikun5AG3LqTYcNTAqwRxo3rO5j4Z7 9j9g== 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=sbfeAALLyt8ugipsZk4eRhxOpj3dXmP6tjmNRG7ohzI=; b=NzZi3gmDoTP2w7305h/pG/8pS2tK+RmAjhlqDjBdkAiX9iA3rsa6fZY++db7tRwto2 Nk5xmIWuuE1pAtKSeknKTmTzB+ImmImTITqiQ+KpZ4sRW64QUtcPmq7S0VYHPUOjHDl2 bElAa16ftYdRfHWqU4G7sI9WNr8LpfD0nGOLjk/63b5blPwqwg4VZx3HRoklezuZ3T+U QyDpVQHfKataIV73s1SqdCtvfBUzFy0v5DKfQR+V68mbcbu8z9IrHr8k28f+zUL0ZRUv 8fkI+pFWean5er5GSmuY5N0MLyy/0opEPUR5f/RT5x3A05bGT6OEFj+SzK5UNs/9Gr+q U/Fg== 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 i17si3105254pju.96.2019.06.21.07.52.46; Fri, 21 Jun 2019 07:53:01 -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 S1726203AbfFUOwd (ORCPT + 99 others); Fri, 21 Jun 2019 10:52:33 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:12950 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbfFUOwc (ORCPT ); Fri, 21 Jun 2019 10:52:32 -0400 X-IronPort-AV: E=Sophos;i="5.63,400,1557180000"; d="scan'208";a="311013097" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2019 16:52:19 +0200 Date: Fri, 21 Jun 2019 16:52:16 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: kernel-janitors@vger.kernel.org, Gilles Muller , Masahiro Yamada , Michal Marek , Nicolas Palix , Coccinelle , LKML , Ding Xiang Subject: Re: Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls In-Reply-To: <452fc5f1-bcaa-c9a5-9600-0278594e5e6f@web.de> Message-ID: References: <05d85182-7ec3-8fc1-4bcd-fd2528de3a40@web.de> <34d528db-5582-5fe2-caeb-89bcb07a1d30@web.de> <13890878-9e5f-f297-7f7c-bcc1212d83b7@web.de> <452fc5f1-bcaa-c9a5-9600-0278594e5e6f@web.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 Fri, 21 Jun 2019, Markus Elfring wrote: > > I still don't see the point of specifying return. Why not just S, where S > > is a statement metavariable? > > Do you find the following SmPL change specification more appropriate? It looks better. > > @deletion depends on patch@ > expression e; > statement s; > @@ > e = devm_ioremap_resource(...); > if (IS_ERR(e)) > ( > -{ > - dev_err(...); > s > -} > | > { > <+... > - dev_err(...); > ...+> > } > )