Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2031466yba; Tue, 2 Apr 2019 23:09:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy+2ROS8hboZ1VfdmLboNorl1LLU6z6R+/tkI8ypRhuRBjCjdbVlIP9NPCdXx09JwLunAT X-Received: by 2002:aa7:9089:: with SMTP id i9mr12872639pfa.115.1554271750379; Tue, 02 Apr 2019 23:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554271750; cv=none; d=google.com; s=arc-20160816; b=RKEiFtW+fd01Lwv9S8GEv9WeCHrJ+QLTIeMs+UvCWSctA8I7z2gNvqe0KX/kP3X+ew ZQ2/Vg+83DTD5acJFix06ZXKCYmD/+VXI9eCyxZWpDUoZfuHJl4FC8bqtTI8HvjxDcfA 6GvQCZ88z8Mez8OZzgH4GGzevtGePG55j2pvlUTykZHoElmQWk0meQ7g9OOJmcPGU9ek KxFosCHywkk3uDUh2clCIqswniZOfF//GGysHDDGmNLUHqY0LAiMSCtwwvQoehdRxGrG q4ncpmPaVLGR7VtpFwkxJuQZjgoy1eddZUErU7I9u0pcpaQzlTe4EgL3bp31jvZXzlr4 SXMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6cBrL8v1yzgJM7rZEoZbE/zcXKrfxVYejLQLjLvgayU=; b=ISIwrN2wgs9iHrDPIBZXeMdAQluR2HOUA6VL5cBEG2CSfG/v4dXNT0kxpFrSIaixTO ceILMvmWT72bt0UlT4shCVupQZdmYQFzjan97s072Us4Pb/zv2zgvOvE8uAHmolykZDu aZIciucflg9hSiPn8BdFzbY+Nz+uJc+rnC2pbN18GTlPpaGBiyCSEKU3LCFFXxilGp6q I0g4xiRsYHgFeoynewRocob41FiEVqKMt+9KcUju8BH6mLRVn9FFBQMnruyrXxiMVoUy 2JDFunx/+lNJNwigSVK1iGDRGHmAhBtyRgomuWeM8Nt2J5YOXCLiGDBcwP85xuvqj1lP k8kg== 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 o24si13091060pgh.260.2019.04.02.23.08.54; Tue, 02 Apr 2019 23:09:10 -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 S1726330AbfDCGIU (ORCPT + 99 others); Wed, 3 Apr 2019 02:08:20 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44399 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfDCGIT (ORCPT ); Wed, 3 Apr 2019 02:08:19 -0400 X-Originating-IP: 90.88.30.125 Received: from localhost (aaubervilliers-681-1-89-125.w90-88.abo.wanadoo.fr [90.88.30.125]) (Authenticated sender: maxime.ripard@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E8A8C20008; Wed, 3 Apr 2019 06:08:11 +0000 (UTC) Date: Wed, 3 Apr 2019 08:08:11 +0200 From: Maxime Ripard To: Guenter Roeck Cc: Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Joel Stanley , Nicolas Ferre , Alexandre Belloni , Florian Fainelli , Linus Walleij , Baruch Siach , Keguang Zhang , Vladimir Zapolskiy , Kevin Hilman , Matthias Brugger , Avi Fishman , Nancy Yuen , Brendan Higgins , Wan ZongShun , Michal Simek , Sylvain Lemieux , Kukjin Kim , Barry Song , Orson Zhai , Patrice Chotard , Maxime Coquelin , Chen-Yu Tsai , Marc Gonzalez , Thierry Reding , Shawn Guo Subject: Re: [PATCH] watchdog: Convert to use devm_platform_ioremap_resource Message-ID: <20190403060811.kiqs2oalrgtyqvhw@flea> References: <1554231713-14137-1-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="emfhmtqlgf4nplp2" Content-Disposition: inline In-Reply-To: <1554231713-14137-1-git-send-email-linux@roeck-us.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --emfhmtqlgf4nplp2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 02, 2019 at 12:01:53PM -0700, Guenter Roeck wrote: > Use devm_platform_ioremap_resource to reduce source code size, > improve readability, and reduce the likelyhood of bugs. > > The conversion was done automatically with coccinelle using the > following semantic patch. > > @r@ > identifier res, pdev; > expression a; > expression index; > expression e; > @@ > > <+... > - res = platform_get_resource(pdev, IORESOURCE_MEM, index); > - a = devm_ioremap_resource(e, res); > + a = devm_platform_ioremap_resource(pdev, index); > ...+> > > @depends on r@ > identifier r.res; > @@ > - struct resource *res; > ... when != res > > @@ > identifier res, pdev; > expression index; > expression a; > @@ > - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index); > - a = devm_ioremap_resource(&pdev->dev, res); > + a = devm_platform_ioremap_resource(pdev, index); > > Cc: Joel Stanley > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Florian Fainelli > Cc: Linus Walleij > Cc: Baruch Siach > Cc: Keguang Zhang > Cc: Vladimir Zapolskiy > Cc: Kevin Hilman > Cc: Matthias Brugger > Cc: Avi Fishman > Cc: Nancy Yuen > Cc: Brendan Higgins > Cc: Wan ZongShun > Cc: Michal Simek > Cc: Sylvain Lemieux > Cc: Kukjin Kim > Cc: Barry Song > Cc: Orson Zhai > Cc: Patrice Chotard > Cc: Maxime Coquelin > Cc: Maxime Ripard For sunxi_wdt Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --emfhmtqlgf4nplp2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXKRNywAKCRDj7w1vZxhR xcC5AQDMGPYZqqPoZylFVzhnRPywu3+uyDRgp+bVOSzCVPhQngD+ODZkVk+C1UOh 0qPnCjSWX69QasS5K3P3LVpHtB2jJgs= =+Kfj -----END PGP SIGNATURE----- --emfhmtqlgf4nplp2--