Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2031077ybi; Sun, 9 Jun 2019 02:04:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsvYTzcJ7wR558VoX9ySbicfz1DyplwdinrfRNBF42RfFMu3pX4XpqoCvEmpuBaq3s0IgK X-Received: by 2002:a17:902:ab87:: with SMTP id f7mr10819404plr.117.1560071081087; Sun, 09 Jun 2019 02:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560071081; cv=none; d=google.com; s=arc-20160816; b=C11V2IaLHjw3UAC6m+5u/lETSadp94ybAhI1b6RPDcHd4K55zJcl79xlqk3nErTbfe qAHKcdhM2c4YoMrDtSxBiWymVumUDCgXaJTlRwXmyYuMLfQsm4VvMC/85JyPIWuXrrLH kWtTrqiaJevsmgOVOxRt/18keZzltO/BYI4bR1hJVAFmr18IVIWmb4vY6BeW0u0ydnoC g6B3SW1eTai+Yzc/foURvjdApeD8TXeo9nf7HbrUH5FqHC3P6GidFj8vwZsNuZWelUnX XWbG+7JedS/zRJrQ7F1AxghJl4k/CA6iRKnfz0HnY7bjI9hFkN4lIIOKCmpLapdTzcEP IVwQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=A3axdFJ5c6fjIvx7a/kZuUzhcGqFEJriHeq4w5jYnRQ=; b=NPi3lqKIujvVHQw7Twvl77Mpl0KgE7eI6Rx4o9GWx0GhGo69Zg/fj6MutctXBQ0oxn J0YxPmDUIT72orfJ8yP1FUzddZ7YFx/uCTmDbn14lf4cVLpVKK6CsU8WEuUoLKBa+lKQ G13m+vAYcQ1S2HRa07NcBhhmnctaQc6cOAPHCLOMePdnaa6mGAvI3pfd6oX52vyRoHft RfcIVjNIQlLM9mztRWEriyVMrBvZlB4UOo8XFYy2uuFKxa30oyks+/uls2dVtDXjo29i k6hjDUvM5QIlvpmIE7lN0WjXWVhyHv9gdCI6ISTa9Tx3XgMbsP1fllYeg1Zn7oLZbtUf LQoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=TpcOjKwf; 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 g17si6883474plo.69.2019.06.09.02.03.49; Sun, 09 Jun 2019 02:04:41 -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; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=TpcOjKwf; 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 S1727974AbfFII4D (ORCPT + 99 others); Sun, 9 Jun 2019 04:56:03 -0400 Received: from mout.web.de ([212.227.15.4]:49955 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbfFII4D (ORCPT ); Sun, 9 Jun 2019 04:56:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1560070546; bh=yWKywYw0sHaVLOotH7c9LtTSfYfsAFBvYCxGv700zxE=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=TpcOjKwfhXcdS7UV9guaO26+AUkea3jN+H4iVnWEdsnhHObPt2QM8xa6QrGkjfshs XZhuC28QpdhPHGB1lIGnDuNvyBB9Eyrrqpl0aEZNqoDuJ7UGcpKMf4Fx1+7ZKx1PpD TUMW332K9BBRRYu4Y9T+LGmfCCbSM79h0sHbf+rE= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.4] ([2.244.77.74]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LnSOM-1gtQSN30BC-00heRC; Sun, 09 Jun 2019 10:55:45 +0200 Subject: Re: Coccinelle: api: add devm_platform_ioremap_resource script To: Julia Lawall , Himanshu Jha Cc: cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Bartosz Golaszewski , Gilles Muller , Greg Kroah-Hartman , Linus Walleij , Masahiro Yamada , Michal Marek , Nicolas Palix References: <20190406061112.31620-1-himanshujha199640@gmail.com> From: Markus Elfring Openpgp: preference=signencrypt Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQvCC1r3MGoxEC1tuEa24vPCC9RZ9wk2sY5Csbva0WwYv3WKRZZBv8eIhGMxs rcpeGShRFyZ/0BYO53wZAPV1pEhGLLxd8eLN/nEWjJE0ejakPC1H/mt5F+yQBJAzz9JzbToU 5jKLu0SugNI18MspJut8AiA1M44CIWrNHXvWsQ+nnBKHDHHYZu7MoXlOmB32ndsfPthR3GSv jN7YD4Ad724H8fhRijmC1+RpuSce7w2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5TS2YCkQvsyf7vIpSqo/ttDk4+xc Z/wsLiWTgKlih2QYULvW61XU+mWsK8+ZlYUrRMpkauN4CJ5yTpvp+Orcz5KixHQmc5tbkLWf x0n1QFc1xxJhbzN+r9djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: <7b4fe770-dadd-80ba-2ba4-0f2bc90984ef@web.de> Date: Sun, 9 Jun 2019 10:55:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:JDSlyCoTpTsPKOQ677p0YWGseBYr8HGllMkZiK9aphYVpDna+in SzvU0jbR4UgnupEymNoBCKfwYyLZIL1KNSYbBGWtPsBh89e8xArdCCGIeNLhpf6HxiKY1ov EFOUbueuJxDe5LICmL89fJp7dliVfz4IqkOM0ZDAxQut8KLmAYSDaeh/EOy8hmAjqv5kJIj uiFASifQqioungX2KrFgQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bJPEe4L2Q5A=:s4pRhCV8TjuiB4jQ5yEW1X eyENHdN3LzPOMV+OL/UF2bzVHKvIIIFpbDsb2KoCptDRcjcmgtk2CtyB4wE7hYjC5aOzlLbYE LbziWYLh6iEdKoXb3GFSqhkCnyR8FK1EgHnMASPwa+uOCZ4McLCmNgbt0+htfKH8o09egGTMA xzny9F5mfaAF7ifljXj0Q2dtTkpyKCn1qq0lDk92r1Y22s0mX2ecL2PEqE+Br+2WuKBUh8uaC 3Ww4cyd3bkNpWZ6dmcSTtslwT623ejZSmjQRpED8HHQxSXvYKK5oENS2PAMhic1K2rX+3+Eg1 Y3O0qGK4gbVR17IRTOCkxWhet1BODXXKXAsbfEvF4f9M5MSUvoxUIsApijuPtVWhoEmVoB0WF MR5NsI02LW1pV3rHvPsNk7k3jd2Ofwq1CFk34BGLGWgMPmpEBHeqGFp2xPWyY3m4a3OvedgQC 3WBxBnOKGmYqJSd5w7CWblETQma4aPnBN2u+3vsDAi0Kc+/R5IQFbHqV8QN7lgcsMt86eq3hv NArqTXrRoWT6IObaS+a+OP1FkgB9CmCWCSSPiPTd7hUqxcnYSM6PsoN+LPfQEmADlKmdoyiyt OPKSNJYc6/08AY46oyeVxSj4cxd/o2zPxJgtzBhZ1R2WK8LcKaLqTD74QL1dlCWEqs6TOr/90 U8iFIWoUkXA7nngFLSWtXm7j3oESPsIoSSSuUO4bZahhigAweKyilKTvryf1ypBq5GK/iUDiE 19b9ZDlTLn4xYYww4qy2NTmu+jrEPR6fF6G1SZ2RWaqeW3L8UmQ2PdAX4Gv5Oxguicm2bK2XS GE2dSYS0c8XE6BSQtmT1QhgR/qkrZFbEI+WXtB5y7MrFd9arLMTB+uxSLNs1zu/t11UZufiyh 6EyBJY0jLGEAKDQyfRU0N2emiMiZf4BzXLe/JlNi8c+YSSjLQjWoiW8fQGWPBYsa5npBP5bY+ ijt0EVXuW7bJYBWL0iMstJpLhM+u2bSHdV7BNL3qoskrmSgLRXzyf Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> +- e1 =3D devm_ioremap_resource(arg4, id); >>> ++ e1 =3D devm_platform_ioremap_resource(arg1, arg3); >> >> Can the following specification variant matter for the shown SmPL >> change approach? >> >> + e1 =3D >> +- devm_ioremap_resource(arg4, id >> ++ devm_platform_ioremap_resource(arg1, arg3 >> + ); > > In the latter case, the original formatting of e1 will be preserved. I would like to point the possibility out to express only required changes also by SmPL specifications. > But there is not usually any interesting formatting on the left side of = an > assignment (ie typically no newlines or comments). Is there any need to trigger additional source code reformatting? > I can see no purpose to factorizing the right parenthesis. These characters at the end of such a function call should be kept unchang= ed. I got another software development concern according to the discussed software update =E2=80=9Cdrivers: provide devm_platform_ioremap_resource()= =E2=80=9D (from 2019-02-21). https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/= drivers/base/platform.c?id=3D7945f929f1a77a1c8887a97ca07f87626858ff42 The flag =E2=80=9CIORESOURCE_MEM=E2=80=9D is passed as the second paramete= r for the call of the function =E2=80=9Cplatform_get_resource=E2=80=9D in this refactorin= g. Should this detail be specified also in the proposed script for the semantic patch language instead of using the metavariable =E2=80=9Carg2=E2= =80=9D in SmPL disjunctions? How do you think about to delete error detection and corresponding exception handling code for the previous function call? Is the SmPL code specification =E2=80=9Cwhen !=3D id=E2=80=9D really suffi= cient for the exclusion of variable reassignments here? Regards, Markus