Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2454007rwl; Sun, 26 Mar 2023 23:47:53 -0700 (PDT) X-Google-Smtp-Source: AKy350b9B5uvkBiUzqFfd0p4+W8q/wzWnZFX0f1b+7qHIHVDMtsN07zWMh0SK6MNuwHxiEQYBg6P X-Received: by 2002:a17:906:1d0a:b0:8b1:7b10:61d5 with SMTP id n10-20020a1709061d0a00b008b17b1061d5mr11806223ejh.33.1679899672856; Sun, 26 Mar 2023 23:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679899672; cv=none; d=google.com; s=arc-20160816; b=OiQopRkHp1d/9lYz8eSPTQR1nTR5ytfYwNIjOps7pkhKLqW+9mVP6g6Ydojix8aXKZ BSYvf69mZ6M6Asi+86DrVBmgmuAr4mIhEMeW62NN8FWzYU14w6vv9TMsy+Qod5ZC44C4 18jk/S4cMv5fIA9bCWgcJlgNJLKq8d5Qj2fvdSNScYk7pM9MGOnAMsDi6+4aJFatYFJt Y4EO3bSP1FqC4RQ9FXzO+cAmhOgrPU8+m4yWd2ocLFZA/EtqF8EurUNCXu4S8Tz0vOqy Dv83aNk7QWQR3QzNj1B4JvLSl2p3yUG76ya24fPehG1tcaNX+8VoYdoETZYDN97A8dE3 cYYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=CX6LphSO7Mcx4LZvoUYHWq48a59ERd1K/Z8WQExTPEM=; b=zgBurVwEDo/6rEZunsESmm/6XePo9KxPiMkeaukzSw8HDYZmhIKLD6XvH9nV2suseM 8L6z6BiEIUhLiJ+gye3oDHLvAIgckmMegFzOBS66gW40KN9SkXHRVpRmxQInQJlqZurs 3fylp+ZUKt0W6Ro9N0ogj90wXpYVY87XxtlQhKiVgqOj9cGRlqFlfBrG681Cf0lNZFPC bBDnSDoSU9VUfw028xZLoY5wnaqAX6OVHDqyXAZSaMU06VbGV1UJbynVAaBuScFI9AuC qHKBRlmwgz/Us0445yt1tdfWrmkIA6fVG6nWG/AfgyCZQyRHuv04r2BF8sRb5gZkFRjZ XAQw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv9-20020a170907080900b0093e277f4cc2si9087363ejb.429.2023.03.26.23.47.27; Sun, 26 Mar 2023 23:47:52 -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 S229959AbjC0GqQ (ORCPT + 99 others); Mon, 27 Mar 2023 02:46:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjC0GqP (ORCPT ); Mon, 27 Mar 2023 02:46:15 -0400 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECFE130CB; Sun, 26 Mar 2023 23:46:13 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VehiUOk_1679899569; Received: from 30.97.48.73(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VehiUOk_1679899569) by smtp.aliyun-inc.com; Mon, 27 Mar 2023 14:46:10 +0800 Message-ID: <60a08a27-f611-c64c-eec7-27703a08cfa0@linux.alibaba.com> Date: Mon, 27 Mar 2023 14:46:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH -next 1/2] spi: sprd-adi: Use devm_platform_get_and_ioremap_resource() To: Yang Li , broonie@kernel.org Cc: orsonzhai@gmail.com, zhang.lyra@gmail.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230327060516.93509-1-yang.lee@linux.alibaba.com> From: Baolin Wang In-Reply-To: <20230327060516.93509-1-yang.lee@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=ENV_AND_HDR_SPF_MATCH, NICE_REPLY_A,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: X-Mailing-List: linux-kernel@vger.kernel.org On 3/27/2023 2:05 PM, Yang Li wrote: > According to commit 890cc39a8799 ("drivers: provide > devm_platform_get_and_ioremap_resource()"), convert > platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li Reviewed-by: Baolin Wang > --- > drivers/spi/spi-sprd-adi.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c > index 3b158124d79f..22e39c4c12c4 100644 > --- a/drivers/spi/spi-sprd-adi.c > +++ b/drivers/spi/spi-sprd-adi.c > @@ -541,8 +541,7 @@ static int sprd_adi_probe(struct platform_device *pdev) > dev_set_drvdata(&pdev->dev, ctlr); > sadi = spi_controller_get_devdata(ctlr); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - sadi->base = devm_ioremap_resource(&pdev->dev, res); > + sadi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(sadi->base)) { > ret = PTR_ERR(sadi->base); > goto put_ctlr;