Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp232995ima; Fri, 15 Mar 2019 01:22:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwazl8Y/qru0v/ahGcryVNgmC0bnauWYRRTgi4jlbmE9t646UgaBlXmu7DfzkoVgvBl7QVB X-Received: by 2002:a17:902:2ba8:: with SMTP id l37mr1500501plb.17.1552638123154; Fri, 15 Mar 2019 01:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552638123; cv=none; d=google.com; s=arc-20160816; b=IjwhpjW6tpFrWTc4HlD6XzIaJ81xzFLLpyTtWN5tUQB3WgoOovgisy3F4cZE2HPVDj IDn0EhQEKk3N0XlPnzeN0tuWw6m+BRydS/sXjZBC+oTT3kIylGK75awy6nRFLB1hEO62 0mZvUKHyqS9cSspX+Oy0pB2Ym7TaScLpWlws17pG0b19h3YBgOBaAvlN+e19wfhrhw0I FtsnkZzRqXyuZ4TjjNmJN4wg5gvMH6hBG5myo1Wa1VyS7/4N3mjCMbCY/PVTFtlovqSK xhrZszZYlnGX10rKZjMjZ6ZmfgCvpxsZapIoPL+bMs3SUYqf9o0myiRM6Y5JmMVI/ifE Idbw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=MDsarYZ7+Poc5AIJkRcRq9PMPExq/pZcTe8xiOuMxMM=; b=SeTCXUFXGh5puoTXgVoycm1tEUNwuOyBeAEl9RM4H08VRI7RrYtleYMGnWbsPy0Orm uPqQHowuGBNb0rfS33bQ7gqRpLa9tAxuficEz/R+chMYMz1L5vyM9VS0CCC4bEy6IlUO 08tH3KD7WXkeDh7/0f1N4+9zJOnRJKFVruSSPgrKTdqkStQhB+Bix/oHJBTmyyyEuHWC UkwU7vW28PIt4dxt1rSK2nWNEYQL1LLunAs0SVjUXFhAyzGbEevcbVmGJuCVHKFVkjax vQnvJLWexU01VoooWY0PE/WK8BWL4fV19BNxfZhOm/LQ48H+nTLFCDKOrdclCraHd6Mx iZTA== 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 j4si1149562pll.286.2019.03.15.01.21.48; Fri, 15 Mar 2019 01:22:03 -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 S1726898AbfCOIT5 (ORCPT + 99 others); Fri, 15 Mar 2019 04:19:57 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:33243 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726584AbfCOIT4 (ORCPT ); Fri, 15 Mar 2019 04:19:56 -0400 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.89) (envelope-from ) id 1h4i46-0006ZF-Bq; Fri, 15 Mar 2019 09:19:42 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1h4i43-000428-EX; Fri, 15 Mar 2019 09:19:39 +0100 Date: Fri, 15 Mar 2019 09:19:39 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org, linus.walleij@linaro.org, bgolaszewski@baylibre.com, andrew@aj.id.au, f.fainelli@gmail.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, hoan@os.amperecomputing.com, orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, keguang.zhang@gmail.com, vz@mleia.com, matthias.bgg@gmail.com, thierry.reding@gmail.com, grygorii.strashko@ti.com, ssantosh@kernel.org, khilman@kernel.org, robert.jarzmik@free.fr, yamada.masahiro@socionext.com, jun.nie@linaro.org, shawnguo@kernel.org, linux-gpio@vger.kernel.org, linux-mips@vger.kernel.org, linux-pwm@vger.kernel.org, linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de, Julia Lawall Subject: Re: [PATCH 05/42] drivers: gpio: bcm-kona: use devm_platform_ioremap_resource() Message-ID: <20190315081939.zr3vv3a7a6wf7byw@pengutronix.de> References: <1552330521-4276-1-git-send-email-info@metux.net> <1552330521-4276-5-git-send-email-info@metux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1552330521-4276-5-git-send-email-info@metux.net> User-Agent: NeoMutt/20170113 (1.7.2) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 07:54:44PM +0100, Enrico Weigelt, metux IT consult wrote: > Use the new helper that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. > > Signed-off-by: Enrico Weigelt, metux IT consult > --- > drivers/gpio/gpio-bcm-kona.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c > index c5536a5..9fa6d3a 100644 > --- a/drivers/gpio/gpio-bcm-kona.c > +++ b/drivers/gpio/gpio-bcm-kona.c > @@ -568,7 +568,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > const struct of_device_id *match; > - struct resource *res; > struct bcm_kona_gpio_bank *bank; > struct bcm_kona_gpio *kona_gpio; > struct gpio_chip *chip; > @@ -618,8 +617,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev) > return -ENXIO; > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - kona_gpio->reg_base = devm_ioremap_resource(dev, res); > + kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(kona_gpio->reg_base)) { > ret = -ENXIO; This should be ret = PTR_ERR(kona_gpio->reg_base) , shouldn't it? (If yes, this is orthogonal to this patch, but still worth fixing.) @Julia: Is this something that coccinelle could catch? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |