Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp358142pxb; Fri, 3 Sep 2021 03:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUxEi/VcRhvNSAU5IW916aZEXpMsXGRsIiNaMGRGvdGwNR+NQPy6wvS7stcqgbZ3dQ+nve X-Received: by 2002:a05:6402:10d7:: with SMTP id p23mr3381716edu.74.1630666375019; Fri, 03 Sep 2021 03:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630666375; cv=none; d=google.com; s=arc-20160816; b=iq8DVeaHIo2qF518+5ZQ2LHdaepmu0k6PjFfW1n03TqdIGBsKmj/2u1NVIQQ6AK92L yMGjci1OAVB4X72e78wGoAvvS737GxkzA7PaNtDTnqO1/esNehd7kZ3eEBRmDHcLVvFs Wd67UgRwpxUULaf2ANF58KOqxCXaT+vX+XdaDNxZr5zRIv/w/111FXLWIrYs3/X+xZ6L mzxyayhtH7E8VowTAV6GPzLzCetUFGJ3x+ud+bIdu2DSdZ9Zbe1uZycjUnzOf+pLGYsQ r/97YixKwKNIJu9Ettk2QHKapH5/1UbbDfmc4eBRV1pOi5YgvcmDf9PFYL0qbyxGQOW9 RC6Q== 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=649dDLEsTpY20f1ujpD4Ab5GxIseeAzBCbsCN967yd0=; b=OtxsI4JoI0X64JW6YVdPxA+Qd2nCyBMg705bd0/8lu9AUsyWy/ULxKnnGge/+UBlZV 4uXh0glOcNhthXcrCSnZu5CZdA6olWejkoJ745aufRihOhs1VfMlSxG3VR0zgav/8kJK hnTkpoiYq5esv51u2lRZ8mTKi7ijkuR3BIJfF/zsRF5wYDQ05rI8lgvbirshq+UvkAJi lwBynSihiRiNCi3ZecfzAlthQoMgAW6Ms46I2QOL71+5EVzqA1RpglJMGqgQg8vKABLW ItMSpNttNQG0OOJmEZCfzIAedwHicoVbLPDwk9/vTqZVF/7TEK64rW4Bh2HnBle0CJPb CgEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=mD90OOCh; 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 df1si5138463edb.268.2021.09.03.03.52.30; Fri, 03 Sep 2021 03:52:55 -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=mD90OOCh; 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 S1348334AbhICIc2 (ORCPT + 99 others); Fri, 3 Sep 2021 04:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348135AbhICIcZ (ORCPT ); Fri, 3 Sep 2021 04:32:25 -0400 Received: from mail.kmu-office.ch (mail.kmu-office.ch [IPv6:2a02:418:6a02::a2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B612C06179A for ; 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 00DCC5C1FB7; Fri, 3 Sep 2021 10:23:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1630657403; 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=649dDLEsTpY20f1ujpD4Ab5GxIseeAzBCbsCN967yd0=; b=mD90OOChPsCYRklb3tv2eE3zeOCpGUJuCBEyZoaA69+HCnicdvw0D/XfIykaJsH3jR+rpx Z3l/XhF+SIfc+qvE7IYiICPo0lV2CDB64S1Uyb9QXiNkLPoHo+qJXuT0rU6J9nCG5RGW5a GALTdK7nKYlDJLtBytORL7Wptov1jzI= MIME-Version: 1.0 Date: Fri, 03 Sep 2021 10:23:22 +0200 From: Stefan Agner To: Cai Huoqing Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: vf610: Make use of the helper function devm_platform_ioremap_resource() In-Reply-To: <20210901074245.9583-1-caihuoqing@baidu.com> References: <20210901074245.9583-1-caihuoqing@baidu.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <26cdf34dbda1327f60da32b9c29130a6@agner.ch> 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/vf610_nfc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c > index 40d70f991d89..a2b89b75073f 100644 > --- a/drivers/mtd/nand/raw/vf610_nfc.c > +++ b/drivers/mtd/nand/raw/vf610_nfc.c > @@ -807,7 +807,6 @@ static const struct nand_controller_ops > vf610_nfc_controller_ops = { > static int vf610_nfc_probe(struct platform_device *pdev) > { > struct vf610_nfc *nfc; > - struct resource *res; > struct mtd_info *mtd; > struct nand_chip *chip; > struct device_node *child; > @@ -831,8 +830,7 @@ static int vf610_nfc_probe(struct platform_device *pdev) > if (irq <= 0) > return -EINVAL; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - nfc->regs = devm_ioremap_resource(nfc->dev, res); > + nfc->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(nfc->regs)) > return PTR_ERR(nfc->regs);