Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1117354yba; Tue, 2 Apr 2019 02:39:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwszXxKVCasbUfKY2EczIvGr/rz01VzwLRUSdzzHpQ1G4b+q0iONao7g7CYT1G8J1DM2/y+ X-Received: by 2002:aa7:8208:: with SMTP id k8mr50269672pfi.69.1554197966195; Tue, 02 Apr 2019 02:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554197966; cv=none; d=google.com; s=arc-20160816; b=RzejwBhTG3X0EQLKIQQf3p2I+JkSbPzjX6IRqNm6mq4XxrS6UHkMjAKmL74tmXV5rH BY5FkUP6zElbPMKd46pZaXdmYJ83zmkunjh4CjIsnBWbNQji0QRvpCR6u1aDpBNHR6wp Rc9oUrtw/cx9pvJdUDpvhAMPtJQsnwkl98mkskUSaQDl6b/QiQhLZxrY80BScK9w66tt frKaSXs7qIA8io+l2ROWXegkcru7iZ+v0WKIaINYRO6TTBOG1tX9wxwlRVJGOatG+q5e 2089eOjZjA8vlLXXjzmkJc4KswLv2YU759/0lm7zoyZGwcc/qoIpdcpqhEncMbkESvfJ YKSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QFHv/1EKVVkwkcwhoWRyJ4Zel9NdPttTyMtQT6gPj3g=; b=glcEc4UK+yCDzs+CI7QCNWi2WHkhkVQreVulcLpkBD0GZmxLY+7hlIom85CL9sofiK fewioJOH5OnSoACTBjJWg6aZDHT3vY8nj3dX7+DG2AnrbKOctyKlJhvgS8gTttBa1FMK NxIoUJcTmXw+NGnDuaba50xJcWPKdYNW3QL2gfj2R/BkWNs/2Tr7ndd7zZFoFtIlgrbb m0psey6su957OZq1Q6Euak733aNdFHvgdCeYXMl3M5Lio35b7UyxFBv0dLwEe9ByT5oe wlunwiuvNettv7zACDaXA2vOb6tfeWExBJvZ8lAzZO7ecHoXKEqBgCQylZAH8uspufDH R43Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hrg6MLVc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si237062pgp.557.2019.04.02.02.39.11; Tue, 02 Apr 2019 02:39:26 -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=@linaro.org header.s=google header.b=Hrg6MLVc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbfDBJUi (ORCPT + 99 others); Tue, 2 Apr 2019 05:20:38 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:33952 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728684AbfDBJUi (ORCPT ); Tue, 2 Apr 2019 05:20:38 -0400 Received: by mail-oi1-f194.google.com with SMTP id v10so9879057oib.1 for ; Tue, 02 Apr 2019 02:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QFHv/1EKVVkwkcwhoWRyJ4Zel9NdPttTyMtQT6gPj3g=; b=Hrg6MLVcwbJ0LTdZkhwomYvYzkOmmb7FNht8zsOy0AcJY4Fo+QCLXgBTEGd4yZP8oU hLcs1WpUYCjWYyzcv2XS2VSH3L5KhNZ+kI8ADr6tig2uxKeJP+rBuJC+5IYqgCsrZCE7 T/VBZlbubg/DIum6GWuCKLyaelKBseMSoZcO6CIvoefewDtKmBcdmuGK+MSW6PHhPsao ichZs+1XeSTaC1VOD1vFEbW/8tWE6D3jyz3yWtesmXVrht4bdZ5QDG9srEI/UeBJjRIn bP9YYonB++XsFUXdn1LZyPHlVyY2W5vxFOtO+0sxbsGcaaUTuz1iHnrYSQ9gg6OVI2ob FoMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QFHv/1EKVVkwkcwhoWRyJ4Zel9NdPttTyMtQT6gPj3g=; b=p8Fwj5Elhl4gpA26y5kxp9z7FEVfKrcNZ2hLjeNw+obYl9zHCANUhvFaV7OIdDR9v7 hTqLflUoQma8AmWTl61rTtQdZ3yUc1fx9bBpMEOXTn/Sz1b0j6DvNcimwdfA11bCxc2Q mst1rptGQWeKOOy8Ce5/uTe6GMSWxRe5LZGsVMFsDEEUWj5VRRJjT0KGxbmm19R62vnv WdH6KH7sF5fMw9WLx+YoYlyQss+YNq9eVE1TFrpwIjr7hr6N9vXtTbKWsxIsAH+gBSuD gyuv62oY9bUh7InLa8kn3yQAzcpAZ8OLlGx6dj8FwoF3JwlVqiGbTw1e4wcRJbJFmioR ZOGg== X-Gm-Message-State: APjAAAWP3jKLKFD9dFmsp6ga95bAp+kPFw6s3c8biZrN+tKbVxFI9Si9 SckqXs/7gvhQEfLYnz/MBlEbbVD/BrjYDOIDq7R6Aw== X-Received: by 2002:aca:b607:: with SMTP id g7mr15401415oif.6.1554196837307; Tue, 02 Apr 2019 02:20:37 -0700 (PDT) MIME-Version: 1.0 References: <1552330521-4276-1-git-send-email-info@metux.net> <1552330521-4276-29-git-send-email-info@metux.net> In-Reply-To: From: Baolin Wang Date: Tue, 2 Apr 2019 17:20:25 +0800 Message-ID: Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource() To: Linus Walleij Cc: "Enrico Weigelt, metux IT consult" , "linux-kernel@vger.kernel.org" , Bartosz Golaszewski , Andrew Jeffery , Florian Fainelli , Scott Branden , bcm-kernel-feedback-list , Hoan Tran , Orson Zhai , Lyra Zhang , Keguang Zhang , Vladimir Zapolskiy , Matthias Brugger , "thierry.reding@gmail.com" , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Robert Jarzmik , Masahiro Yamada , Jun Nie , Shawn Guo , "open list:GPIO SUBSYSTEM" , linux-mips@vger.kernel.org, linux-pwm@vger.kernel.org, Linux-OMAP , linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Apr 2019 at 17:19, Linus Walleij wrote: > > On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang wrote: > > On Tue, 2 Apr 2019 at 17:04, Linus Walleij wrote: > > > > > > On Tue, Mar 12, 2019 at 1:57 AM 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 > > > > > > Patch applied with Baolin's ACK. > > > > This patch had some problems which I've pointed out and I did not ack > > this patch. Please do not apply it now until fixing the problem. > > Sorry, it's the gmail threading that confuse the different patches. > > The patch I actually applied is for gpio-sprd.c and looks like this: Yes, this one is correct. Thanks :) > > commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel) > Author: Enrico Weigelt, metux IT consult > Date: Mon Mar 11 19:55:08 2019 +0100 > > drivers: gpio: sprd: use devm_platform_ioremap_resource() > > 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 > Reviewed-by: Baolin Wang > Signed-off-by: Linus Walleij > > diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c > index 55072d2b367f..f5c8b3a351d5 100644 > --- a/drivers/gpio/gpio-sprd.c > +++ b/drivers/gpio/gpio-sprd.c > @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev) > { > struct gpio_irq_chip *irq; > struct sprd_gpio *sprd_gpio; > - struct resource *res; > int ret; > > sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL); > @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev) > return sprd_gpio->irq; > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res); > + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(sprd_gpio->base)) > return PTR_ERR(sprd_gpio->base); > > Yours, > Linus Walleij -- Baolin Wang Best Regards