Message ID | 20230329062450.58924-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp206236vqo; Tue, 28 Mar 2023 23:43:00 -0700 (PDT) X-Google-Smtp-Source: AKy350bq64OHvheZEqkOaB8P/Gu0RSwD9gId5+5OMoum6d6Fj5oLp8u9cXgM8gL6gF5iTX9cDh6P X-Received: by 2002:a17:907:6d9b:b0:941:1cf6:dbea with SMTP id sb27-20020a1709076d9b00b009411cf6dbeamr15927506ejc.55.1680072179876; Tue, 28 Mar 2023 23:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680072179; cv=none; d=google.com; s=arc-20160816; b=ErFYeK+d+flHINJS0Xiq/E0aAa61fse6GtQYhx4e25DNZgq7Ws2D96w7n5UM3ZYKRg hWE4IUqyKWp7eqVjPSOfZMtiRdR1qfMuHLsdsGoR++wKT8PbbHxAVTvSN0LvniCh7anb PiYTnP5mq4HXAkl4yjQmElbOoazQxGYMb/X7gYnFWbrwG+BElaIMAibUfkBdvJl7RXpZ ULymBX6zEWYcJHC8ffnwHZeLx+LwfEA93bLVOzXCdB73eQbyXt4/WaGHUtV60fZDUNpU rRoNlDRdHSxpnGMky9esSGwDyKN6miwUeyx1XyhC+JLHFTRaSjro3A1RYSfK5j/4uNqH 1FWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=udZIs3ZngD/tSmEmtT+b6gCFjNGBu6fGzPikhPNEQHI=; b=BmsTKAuKhR7AuegXsTuh66wJGWApdwP3mlImfqLksA3i/t+387kC3DVZ2OG3SboTsk FKTbYFmgWuVA4svvC/aTCooT7nby/lPc+9xSewnewf3PLud3Tg+hPGWi6etGccF4Duni 8wdw5jUEJTyMMsDJ/SUgvU2+sFJD8XoEJmkY/qGBSWpqSRFBKn85JNCqgmQ8z2O0hZBb VFFlxfJBrejzvDbSgZ210siprloHk3EXlfZuFZM0mJ3znxZkVRP6D0YEK4/+l2fDj5T7 ph2uf6w9aG7jhv3KTVl9qmCDKt5rUYtlkeDpiDgfWuCCei8dxuEVeoqr5YaY7BySiILW R1iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ld10-20020a1709079c0a00b00940e715a40dsi9208831ejc.408.2023.03.28.23.42.35; Tue, 28 Mar 2023 23:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbjC2GY6 (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Wed, 29 Mar 2023 02:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjC2GY5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Mar 2023 02:24:57 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 740DF10A; Tue, 28 Mar 2023 23:24:55 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R731e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VevlojM_1680071091; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VevlojM_1680071091) by smtp.aliyun-inc.com; Wed, 29 Mar 2023 14:24:51 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: broonie@kernel.org, tudor.ambarus@linaro.org Cc: heiko@sntech.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next v2] spi: rockchip-sfc: Use devm_platform_ioremap_resource() Date: Wed, 29 Mar 2023 14:24:50 +0800 Message-Id: <20230329062450.58924-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761683366141411730?= X-GMAIL-MSGID: =?utf-8?q?1761683366141411730?= |
Series |
[-next,v2] spi: rockchip-sfc: Use devm_platform_ioremap_resource()
|
|
Commit Message
Yang Li
March 29, 2023, 6:24 a.m. UTC
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource(), as this is exactly what this
function does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
change in v2:
--According to Tudor's suggestion, use devm_platform_ioremap_resource() and
get rid of the local variable too.
drivers/spi/spi-rockchip-sfc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On 3/29/23 07:24, Yang Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_ioremap_resource(), as this is exactly what this > function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> I still prefer a single patch per subsystem, but Mark is going to decide: Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> > --- > > change in v2: > --According to Tudor's suggestion, use devm_platform_ioremap_resource() and > get rid of the local variable too. > > drivers/spi/spi-rockchip-sfc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c > index 4fabd2e0439f..b370aade11b4 100644 > --- a/drivers/spi/spi-rockchip-sfc.c > +++ b/drivers/spi/spi-rockchip-sfc.c > @@ -558,7 +558,6 @@ static int rockchip_sfc_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct spi_master *master; > - struct resource *res; > struct rockchip_sfc *sfc; > int ret; > > @@ -576,8 +575,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev) > sfc = spi_master_get_devdata(master); > sfc->dev = dev; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - sfc->regbase = devm_ioremap_resource(dev, res); > + sfc->regbase = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(sfc->regbase)) > return PTR_ERR(sfc->regbase); >
On Wed, 29 Mar 2023 14:24:50 +0800, Yang Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_ioremap_resource(), as this is exactly what this > function does. > > Applied to broonie/spi.git for-6.4 Thanks! [1/1] spi: rockchip-sfc: Use devm_platform_ioremap_resource() commit: 526c2966fca3337f01c513b1f0d85c839f8d8175 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c index 4fabd2e0439f..b370aade11b4 100644 --- a/drivers/spi/spi-rockchip-sfc.c +++ b/drivers/spi/spi-rockchip-sfc.c @@ -558,7 +558,6 @@ static int rockchip_sfc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct spi_master *master; - struct resource *res; struct rockchip_sfc *sfc; int ret; @@ -576,8 +575,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev) sfc = spi_master_get_devdata(master); sfc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sfc->regbase = devm_ioremap_resource(dev, res); + sfc->regbase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sfc->regbase)) return PTR_ERR(sfc->regbase);