Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp474213pxb; Thu, 12 Nov 2020 08:16:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxldFPb0P/ondS6lpEwpFTrpwtv8T9m//eUvxWcgiZxSIhlOfQ9nvhr2CFTBkZW8lrAjiZm X-Received: by 2002:a19:dc07:: with SMTP id t7mr18416lfg.208.1605197815063; Thu, 12 Nov 2020 08:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605197815; cv=none; d=google.com; s=arc-20160816; b=vJBJECy5rA3riEzyXj3Mx3B3s1DqH0RLGUF7C/4W5uL6XGmvBrNlaKzwi+4K3A193G 4LMaz6YU9rll5Xj/ltYXlbcj9yvA4XUTPRxWp7mA9L2F/j6TUHvaoDp9TxSlyDvrEIWs zX8okxSFYpIVmQOWBhpaPMHEZ/X1DUT2EKPU757Utt82N5n/CxOm7eQGl+IUomfDMn6C 2kzCPhKfQj13RqS5fu9vzjmXtA6BooffrgDwh3tvF8UPWWNREPYTcT86SmNiv0jINhrb c59XDilubF5qHnZL0ctea1Ct2LuQo5fddKzuscamCqztwg/M5rxm7QNn+smvkXUX/EAu br4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=v8TsPLk5MYJVEH9ZeIxEK8e5FW5/r7V9yBzdoOLMno4=; b=DXmLdli7q4rKw+0o0VtnIwimOQUadhAWYw9MemDYCl1hiFlwhPZiVMqMEsPTZr55MU UP2iJMNdiwkl3MjyXTnp2B24WGX+KuEynJB/yNhp31uqYrbu8r/hJSSewfk05j71puqn oUST0udLQGtUWyrubhInJNAzbwl6ZOPJOKaRcdo+m7l/uhHV6KCRmAE8AC7JBdEFEpKr oabDKOaw5/D4U4F2qNUdrKLWytxInxigFr4E+dhdqz/nSGr8e6F/bRvXEqcgnCSWPWPO A/ptV2VusF9vs0ORP1e/k3iXx5fwwcYqxGhSJFJ0NVEuXTTRyO5IX9p87dYNt7K31X+n 8SlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ml11si4212316ejb.697.2020.11.12.08.16.31; Thu, 12 Nov 2020 08:16:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728886AbgKLQOc (ORCPT + 99 others); Thu, 12 Nov 2020 11:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbgKLQOc (ORCPT ); Thu, 12 Nov 2020 11:14:32 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D532DC0613D1 for ; Thu, 12 Nov 2020 08:14:31 -0800 (PST) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdFEO-0004TX-DA; Thu, 12 Nov 2020 17:13:52 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1kdFEK-0003CG-Jf; Thu, 12 Nov 2020 17:13:48 +0100 Date: Thu, 12 Nov 2020 17:13:46 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Yangtao Li , thierry.reding@gmail.com Cc: claudiu.beznea@microchip.com, thierry.reding@gmail.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, f.fainelli@gmail.com, nsaenzjulienne@suse.de, shc_work@mail.ru, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, vz@mleia.com, slemieux.tyco@gmail.com, khilman@baylibre.com, matthias.bgg@gmail.com, heiko@sntech.de, palmer@dabbelt.com, paul.walmsley@sifive.com, mripard@kernel.org, wens@csie.org, jonathanh@nvidia.com, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, linux-tegra@vger.kernel.org, Lee Jones Subject: Re: [PATCH 01/32] pwm: sun4i: convert to devm_platform_ioremap_resource Message-ID: <20201112161346.gp5nenuagx5wmwl2@pengutronix.de> References: <20191229080610.7597-1-tiny.windzz@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rowms2wq4q6swhwc" Content-Disposition: inline In-Reply-To: <20191229080610.7597-1-tiny.windzz@gmail.com> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rowms2wq4q6swhwc Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Thierry, On Sun, Dec 29, 2019 at 08:05:39AM +0000, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. >=20 > Signed-off-by: Yangtao Li > --- > drivers/pwm/pwm-sun4i.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c > index 581d23287333..f2afd312f77c 100644 > --- a/drivers/pwm/pwm-sun4i.c > +++ b/drivers/pwm/pwm-sun4i.c > @@ -344,7 +344,6 @@ MODULE_DEVICE_TABLE(of, sun4i_pwm_dt_ids); > static int sun4i_pwm_probe(struct platform_device *pdev) > { > struct sun4i_pwm_chip *pwm; > - struct resource *res; > int ret; > =20 > pwm =3D devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); > @@ -355,8 +354,7 @@ static int sun4i_pwm_probe(struct platform_device *pd= ev) > if (!pwm->data) > return -ENODEV; > =20 > - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); > - pwm->base =3D devm_ioremap_resource(&pdev->dev, res); > + pwm->base =3D devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(pwm->base)) > return PTR_ERR(pwm->base); Can you please comment why you don't apply this series? My point of view is: devm_platform_ioremap_resource is the designated wrapper to replace platform_get_resource() and devm_ioremap_resource(). So I don't see a good reason to continue open coding it. The patch series doesn't apply to 5.10-rc1 as is. (pwm-puv3 was removed and a simple conflict in the pwm-rockchip driver.) The overall diffstat (of the fixed series applied on top of 5.10-rc1) is 31 files changed, 32 insertions(+), 96 deletions(-) and it converts all of drivers/pwm but a single instance of platform_get_resource() + devm_ioremap_resource() (for pwm-lpss where platform_get_resource and devm_ioremap_resource are in different functions (different files even)) which isn't trivial to fix. So in my eyes applying this series is the right thing to do. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --rowms2wq4q6swhwc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl+tXzcACgkQwfwUeK3K 7AnalAf/SZzHfPm53CAOPulFIMZojirosLfMqF/CurOTWDa4pXeZLIfqJ3XR0lAd 1A30iOU6Z6gsaXDu200KL3PWJ4aUlySBGynRmyn7mwEiHcoyNcuatCW2hIxQPptf dIDBPh0Sz3nVjS3asUQnerG/hBoF4uOOMdH0zLLOgLIdX5sIYvN8A4UHIlcTrCXz Am34c7Q2xtG+FheEtp4ytEFQ3TC4tZnOuam6jTUwRFRvHmXmhXQvWx6aRE/m+rz+ Sz9XQNgfwmLfEjdUiHzBzEXuhwC2bhndg5imcT3t6djVcxLqqqAL6zsd7n6myzan 2ry03AJ4yF68gU5nJbV8yuc9VDeqgg== =2Q4E -----END PGP SIGNATURE----- --rowms2wq4q6swhwc--