Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1156814yba; Tue, 2 Apr 2019 03:33:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvx0YgVEETzwgFFynmKYjJubqUszx04MFxhxy/++v0TGSk7QUqZHxeHXjPrUYRX5X47qhg X-Received: by 2002:a17:902:1105:: with SMTP id d5mr71142179pla.27.1554201205920; Tue, 02 Apr 2019 03:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554201205; cv=none; d=google.com; s=arc-20160816; b=0kJe3OEJt86tAKMEQXPeB6YmdOUrHnMqwzkAf//92k5xko8meHbnZbHT5ylbgWOQbS h8oa9WsB3oY2jgOOf+WpxVtEtDgauYfCdxbGHBLORsMLdjS9YA9djEHU7anBpeHyf8ib ynEl72wkUj9ntggw+H6FUv/nE+7ZlDm5pG7BdwyXL2Yv9t+LWSpVpxnlUwCu1ylXAdgh F6uKGd9tcKTlc0oBJeufNQRr/Vnsao1EKTa2P/4GFBCYZVEMx9j0ACWOjF/K3+SBoBxu n2RSpGTHeEG7wmaCynq92jdcYY1yDM8ac3561E3wb1KCuKymDtYU+C5A/91xnXpMV19i IL/w== 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=savQo5tfN+y45IL1LSRmkM0pmYjRsdkEuwf8ptUdZY4=; b=V4xY7ZjoFZZ0ndF2qMuiC3vPcHMq0hF4QCr3MyUUs69qef5fQtiU9zdrHHsSMZplQI OTPbfFkrdnLUVDjjVJUpBPhUSVU6YcATM8uHvkutPbsZpNKfOqapqpZwjSSQi6FZVmrF FytCh58yRLioKxRsD7TbVkAuKBbF7GVGfyo4pH0DWSILtT6vfnFGrGg1tcIWk4yqnuqs A4EexUZOfyTIS9KqXvldFAC9olcqaI4xLoCjz/GyuqUzUzt0EReRFIaE9w8YKgm+yl+T ZsJPphXgOiD3GY1/mXM0T0PMfmL4bQKn27kd3tR4sqm0uTJrwDUXZSc99kjBp3notK17 uqrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iaEu1ZvE; 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 g96si11481338plb.168.2019.04.02.03.33.09; Tue, 02 Apr 2019 03:33:25 -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=iaEu1ZvE; 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 S1728971AbfDBJTI (ORCPT + 99 others); Tue, 2 Apr 2019 05:19:08 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46001 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfDBJTH (ORCPT ); Tue, 2 Apr 2019 05:19:07 -0400 Received: by mail-lj1-f195.google.com with SMTP id y6so10856165ljd.12 for ; Tue, 02 Apr 2019 02:19:05 -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=savQo5tfN+y45IL1LSRmkM0pmYjRsdkEuwf8ptUdZY4=; b=iaEu1ZvE7i+aceOKthhQa0wG7pJ1PrfGYDtQuOrb88tEELV+yUJ3wP6a+J/dxCJXME hMGXODlxFPg05q96NazwqlLEW9lQHQWLy++oZdizqu0eY7/OyckXnxk2fQaXaGpO6AbS +0PJXtlLcIRc0biHtRDT7o7WXzdI+DvreDHNsZpeDldYeHmtVGc5R4VEO03unCCS5Dig O3BPYQdef+tcAAY+AYBbvFNrdsOJBwp3MNYpuvOgnlcBc6Xw4Xpai1T4KJDr0rjrrIVG RjvJAiB2/nMa+/CoS0Zli3dQyWaQ4aPiebrSKRv2g1p+tgVdpwLcUMC7b8Lm7Ukz/N+k F/Iw== 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=savQo5tfN+y45IL1LSRmkM0pmYjRsdkEuwf8ptUdZY4=; b=r0SGER0b6yp7A2cqL1SOx6SmvK+BCpSimKzcwpjzJI2v5E86KvtvDCXMuuf5+CT17Z zP8FenJeWkOV2Jjgc8gct1PNk2LH4Y8/N6G2P12VczpiGf2cv+1k2T2/y+s83DVxwTig P/0gi4dvtSOeFyUk1845G7HpS88NkiapPZCqTnI/OwURhFOwJ/38F1ICdSC+/KtqGM38 8Nc93P3Fyl0q0A4xngdF2gghdnBOGRD+AEUsbClSOdWUzpR9LiRleAdZ8g0unNrb88qe /b5Y6gg0Qe6zE8ldXJwoDYGUVnAK3NasqUo+9mN1QN2R+XCyyOQ1AMoI8T1t15yLHPbV VtLQ== X-Gm-Message-State: APjAAAVcJRpX8B5cj1mMRYv1KC6+KdVvlkgAZO+G8HvNHkkYuLnFhp00 GrdA8MCWMp8yGzxo5TJDn4w7PYGLIDysZr7YTG9pVg== X-Received: by 2002:a2e:808e:: with SMTP id i14mr20135284ljg.103.1554196745108; Tue, 02 Apr 2019 02:19:05 -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: Linus Walleij Date: Tue, 2 Apr 2019 16:18:53 +0700 Message-ID: Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource() To: Baolin Wang 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, 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: 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