Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5048354ybi; Tue, 11 Jun 2019 18:08:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU9Tz7/4aelhIwE/QmAcQHN4kcT7Is1HSKsyH4TBWjCcj4v4YSjGNiKbDJpRflG8wzYm8D X-Received: by 2002:a62:6083:: with SMTP id u125mr6495046pfb.208.1560301700814; Tue, 11 Jun 2019 18:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560301700; cv=none; d=google.com; s=arc-20160816; b=THWdHgH9nLS+QZFLDmLQKYFAHg75wNXZRz6zIK7WlNgvntNOLtKCuW0bOOArpExvai 10nGwWRRhnJDqZn+EO20m1BCwSwtXPy6V33LJRw588IsrfO4csOExsfnMqgAXXc58Nup y/U20XjyKOpBXV7hEgAK6X9bqfpJVuAUNy6pZbnfzMpFxCicgkXyYXEYjYRYMsTvXuOf S5uu5YASwTqYqDDNRXFJUk/2dmXp+Tc0XhSRALFlHROlq0vRy8msgb3v3LTssaDeSk5F P7fHtIjpT180lIRdAV40l0tHAdMMdbSlNmeByW87BoZULckft9hMCMOef4yTFx6ojPpD cHWA== 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:organization:from:references:cc:to:subject; bh=+6vEMV3rsnjbFr9d+/nRDg+cmHts0sDSZyeuXGAB+30=; b=pZk9UE4lPINI0l0Th5m7oR4wHDVm8ipGBzJXK/edlOAPk9+XJYmc9fkyF1pKKcMyOU pUMhRQP/iDwEFI2nD3ttKAATfyLGZyjtu4P4iHcePDgP9juWksk9Coi11moCrwcVN9xb cTJC5jq48fDs7fdThgl6hqwwwtncjTjHNb81VGyJrXMo6yGNPx+wSGWELcYHLoY4eV/4 UnzfclOmkH3nPJIapdiY94keh/lLyUDDOmNUodLJMnYlbE7hn/UIyQ0sHAPTyuiL99pe +HpB4tvPEYVgHRshWDJowyVuO83RdOMv0ibIhWP00tImWZdstcsdzeJ4I/39o7jv5tLa 3ZDA== 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 f63si14628259pfb.86.2019.06.11.18.08.03; Tue, 11 Jun 2019 18:08:20 -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 S2406567AbfFKUkm (ORCPT + 99 others); Tue, 11 Jun 2019 16:40:42 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:35535 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406545AbfFKUkl (ORCPT ); Tue, 11 Jun 2019 16:40:41 -0400 Received: from [192.168.1.110] ([95.118.191.213]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MrQ2R-1iPHOT18lz-00oVWA; Tue, 11 Jun 2019 22:40:30 +0200 Subject: Re: Coccinelle: api: add devm_platform_ioremap_resource script To: Markus Elfring , 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> <7b4fe770-dadd-80ba-2ba4-0f2bc90984ef@web.de> From: "Enrico Weigelt, metux IT consult" Organization: metux IT consult Message-ID: Date: Tue, 11 Jun 2019 22:40:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <7b4fe770-dadd-80ba-2ba4-0f2bc90984ef@web.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:f+Ht5hYFuUjeYvOKk6o2JFMqi39l5C6wxnnE8+7O0BKjk77Q6Gu qW9aH+F0ZT8XX2DGUe0Sjk2ayDE4lx9wopAmDNfaFfijlhzOFpqsy8LoaCD8wFHpI0IZUel ovAoUFC4eCcRwscNpmi84MD7qv7J/UNi3mwOZn58//9eJqryuQDpj3WsV2SpPl7aThOemU/ BtDuGhGNhqpfa9fFMTlTQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:yXeVLoxn+9I=:RwY/bgJO0YPNmR9AYAPBeS /+qzsjqiuP5IAgj2OapVuADyWvI6cWGzbmF3A6aE5gtJaRh2g2WierULflfOPPqEfdaplzAFA yo/GMjqfiPMx++tBUZMbrDF7UeX8G8tAOTnX1MPCa+ToME7XY+iIpkCw+7cvN2Fa/Pv0R1bw9 4cFL42FCsm+z5AID2Owml/OcPwE1KZmnEQ8jfzxuoBdiuiKaV5vvw4xV5Lz+uWTRyqKIOIbo2 yu2birfHdrv/orQpu7CQRHhAxwX0Zw5QGhWjbwIc1U7rzNsXpk7D2OmniUi46t7eIA/wHd/od /MfCYikLODkOX66TcDDtgAswB+J6ko+0O7zOJH6xSAD9t517IfZQ1DH8S9oXl5vxRMDzAQ2pm r9DkylZpbhuI0qTH7s778dPkaX0KSP2MvYf2VVfsI9ILSI8MjDiyRi31Yehmm3YPfLsKcI44o MalWbbQurUYeI/DJj3Xh/jxYYlbtyfXn3BPIE4Z72CHa+3Xz31NLb02XLYQlXZpvYN2oiWW4k aGTzHQUIvQzA7Y2nSLZkNtDaF0B74I7AlkzGshi5yCOEdjRU1R5gVruYCCif23N98W9UuB6TJ 2IjfyxdJSIXsUtwC2oWD0Y4444cuHK+ThFlLQRj5FgW3rBhcK9lOV6wDPgD1KkpTx0R8+5znJ pBnkvkZo8TA9DEHzXObMdjfIAFDrUbZRPZtLpjHYUqpVBRZwN0T6E7rsOEAPPPZxwQRH1wVcW qbaQS5yN+aTEQmPw5QA13iLHpBYrEbWpvjePeWIqHUgX52/KeA8a1qe/NdY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.06.19 10:55, Markus Elfring wrote: >> 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 unchanged. Agreed. OTOH, we all know that spatch results still need to be carefully checked. I suspect trying to teach it all the formatting rules of the kernel isn't an easy task. > The flag “IORESOURCE_MEM” is passed as the second parameter for the call > of the function “platform_get_resource” in this refactoring. In that particular case, we maybe should consider separate inline helpers instead of passing this is a parameter. Maybe it would even be more efficient to have completely separate versions of devm_platform_ioremap_resource(), so we don't even have to pass that parameter on stack. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287