Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2454154rwl; Sun, 26 Mar 2023 23:48:07 -0700 (PDT) X-Google-Smtp-Source: AKy350az/XDKpFDSngw2LGN5kWDRL8vKH2sTFzBE5/jBUr0We2LFlOjNHoNWCpwnQL8uZvPKocu0 X-Received: by 2002:a17:902:f20c:b0:1a1:d624:2fef with SMTP id m12-20020a170902f20c00b001a1d6242fefmr9072157plc.44.1679899687006; Sun, 26 Mar 2023 23:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679899686; cv=none; d=google.com; s=arc-20160816; b=E63bDLMYnT5TeIOsxzgmqm+Kxa+x88uMXvdR+tnWN++7Ki1qdJrMRgKKczCBDhQYQ1 JgBIIwn5MCXmfGCYP9xWXA+0WFSNpWocycaaWja+I1d8yMGK2Fe6wxsU3eBo0j7wReFy y7tmJCv8LucoySotnlOgpFoEKz8+xYNAH9H9gihWsokDzcBf+6P8X7XeOPKzcTTPw3dU jAB6GcX9bwWkS+yVbl+pDutNOvFHz/aZHe4ykYQ7qIemE8zXweTvCogFqDsbfiNr/9s9 LIOOx4MAcnullPvqAjP7cx+Mw6FxbaNLjK5roOG2490nOvntQvOo1FtvjzLsbQ1833bH zPtw== 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=Vtx3ogV0FT2ii6K/AF3dqil9Wb//weqQhTzzAg2Fr5g=; b=GPF4xLJkSQuck33V/oRw5dwSTZlnK8qmUbU9Cn86Sy2XBKl2EUmfOZZ/s1MIyybYzb ULRVTB63UaS4PJ33uzwGUuuNekUg7cJPAirYm9dfHtYzoiMHPapncjGa08sHYWvSknYc Bv+nnBJkKYRk/v4fPfR9e2hwKPOmayS/8n56CpF7ktlfkyNOSXvf1DtsqcwgiluNC1zv xG4pzFROsQiLxL7sn+9WSNPeShaKh4cUyumwmYTnHSdyRMugRGsSanQYUGeWtwp8W9Nh /WaRAe7bJdlYxsJ8njdY1vhes7C0Ua1RYX+gPlS0F1/fc9viCNDVyHI7HHWOhXPpMol/ IfSw== 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 i17-20020a17090332d100b001a1dbb54c51si17351279plr.534.2023.03.26.23.47.55; Sun, 26 Mar 2023 23:48:06 -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 S232073AbjC0Gqe (ORCPT + 99 others); Mon, 27 Mar 2023 02:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbjC0Gqc (ORCPT ); Mon, 27 Mar 2023 02:46:32 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F3E949D6; Sun, 26 Mar 2023 23:46:29 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R261e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Vej261H_1679899585; Received: from 30.97.48.73(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0Vej261H_1679899585) by smtp.aliyun-inc.com; Mon, 27 Mar 2023 14:46:26 +0800 Message-ID: Date: Mon, 27 Mar 2023 14:46:28 +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 2/2] spi: sprd: 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> <20230327060516.93509-2-yang.lee@linux.alibaba.com> From: Baolin Wang In-Reply-To: <20230327060516.93509-2-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_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: 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.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c > index 702acaeebab2..518c7eaca84e 100644 > --- a/drivers/spi/spi-sprd.c > +++ b/drivers/spi/spi-sprd.c > @@ -929,8 +929,7 @@ static int sprd_spi_probe(struct platform_device *pdev) > return -ENOMEM; > > ss = spi_controller_get_devdata(sctlr); > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - ss->base = devm_ioremap_resource(&pdev->dev, res); > + ss->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(ss->base)) { > ret = PTR_ERR(ss->base); > goto free_controller;