Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp357728pxb; Fri, 3 Sep 2021 03:52:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys2Sf+L5zJ6ucBkPVk9U4KrRDw88hqn09hsEZxuvSgh5NzldWl1Cxrcu6+AyxnbHmBgbyH X-Received: by 2002:a17:907:7755:: with SMTP id kx21mr3466347ejc.463.1630666327509; Fri, 03 Sep 2021 03:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630666327; cv=none; d=google.com; s=arc-20160816; b=UF3eKJfoAMxTfrHDbupvRZSiJHSll0TfWLPPcXeTnkKn2XyOqPpIpcNF2TGgziA3Oj 81rVqzLi5Q0bJj0w0RlHkLhzyfYoZcSVe9Dcd9cMM543TASZCNPPXjEQlHeo7Zxc1Rbf UWujjswWlI+klpzvDrDC8PHRwQW2hlJk/RdzCKV/36lgvTN+v5IuNoo1bx5Q/1S+qrBB ZkDl61pwd0j3rFMAHG07GkqvN0gM8i9h3Tk/6kSI+QE+BmpD8VMHU0vsStyzkkbTVYTI YnIJChTN4Q5fw0EU57jE0b4BhaovLYHX8mMWwO/0D1klcB3jgy4GrCpbqh6X9vtmNOMr PC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=fjLOEiXgMndi2Q7uZCMxj1Uu2i4mPZJaKSRzdIFBuTQ=; b=W7wEtTtaQ0RT4BpqBT/8ijzu/dCJWQ4+VnEiXKecY6KGeXD62bVtmCsn/VKG1fghzy pbgG8n0zhaCOwXqEaHAAhdB2D78zZxOBaOfPTcxuKgpBTRGl2OcFd0VnlBEQFXgdUgA0 AN8fG0GRrM1XKzvzDqO+nfafnlF4z3tGVGOnR3frvX/opNTZslQV7Rb1VeUGA9ZzCpQK heM62qcKt4OWhH+nvBYB8t/cWIIf3VlpnwGobeTD38ZnmpoiBLQZXxmafEs0rKy4Zav4 rgueYSy8iV9sAlD3Wr+uBgO1GFLDWlLhJvNIh+LaI6xMap5x9JlXY2jiBAPmyCBb6pp6 JDCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b="T/cjSSjN"; 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 do16si5344854ejc.267.2021.09.03.03.51.43; Fri, 03 Sep 2021 03:52:07 -0700 (PDT) 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; dkim=pass header.i=@agner.ch header.s=dkim header.b="T/cjSSjN"; 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 S1348286AbhICIc0 (ORCPT + 99 others); Fri, 3 Sep 2021 04:32:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348150AbhICIcZ (ORCPT ); Fri, 3 Sep 2021 04:32:25 -0400 X-Greylist: delayed 478 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 03 Sep 2021 01:31:24 PDT Received: from mail.kmu-office.ch (mail.kmu-office.ch [IPv6:2a02:418:6a02::a2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B5B3C061760; Fri, 3 Sep 2021 01:31:24 -0700 (PDT) Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 40DB15C0222; Fri, 3 Sep 2021 10:23:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1630657426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fjLOEiXgMndi2Q7uZCMxj1Uu2i4mPZJaKSRzdIFBuTQ=; b=T/cjSSjNuV1c5iAHsIX3UEBP41pp58INL2FhGpdroivJwC/W88r2CIGqkTVc5KHRp2gflq fXGWBSJgRnR+n8v4eFDJcqT2GWdgSjge9OEX0+1cDnxr9zQF19kle6KCZxVtvArhFbOHJP zevChd2TLYExLz8D8f/TXTpkdjYxTYI= MIME-Version: 1.0 Date: Fri, 03 Sep 2021 10:23:45 +0200 From: Stefan Agner To: Cai Huoqing Cc: Lucas Stach , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Thierry Reding , Jonathan Hunter , linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: tegra: Make use of the helper function devm_platform_ioremap_resource() In-Reply-To: <20210901074230.9483-1-caihuoqing@baidu.com> References: <20210901074230.9483-1-caihuoqing@baidu.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: X-Sender: stefan@agner.ch Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-09-01 09:42, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing Acked-by: Stefan Agner > --- > drivers/mtd/nand/raw/tegra_nand.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/mtd/nand/raw/tegra_nand.c > b/drivers/mtd/nand/raw/tegra_nand.c > index fbf67722a049..32431bbe69b8 100644 > --- a/drivers/mtd/nand/raw/tegra_nand.c > +++ b/drivers/mtd/nand/raw/tegra_nand.c > @@ -1144,7 +1144,6 @@ static int tegra_nand_probe(struct platform_device *pdev) > { > struct reset_control *rst; > struct tegra_nand_controller *ctrl; > - struct resource *res; > int err = 0; > > ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL); > @@ -1155,8 +1154,7 @@ static int tegra_nand_probe(struct platform_device *pdev) > nand_controller_init(&ctrl->controller); > ctrl->controller.ops = &tegra_nand_controller_ops; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - ctrl->regs = devm_ioremap_resource(&pdev->dev, res); > + ctrl->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(ctrl->regs)) > return PTR_ERR(ctrl->regs);