Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp371970rwb; Thu, 1 Dec 2022 03:21:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf4PhAEFCUPfGM+aXeDGq0cmuuiM9jeASDI0xDUsGukqxBzJrnVJjafMMU/t6f+0lpo1d5Ft X-Received: by 2002:a17:906:4804:b0:7a8:3ecb:bd62 with SMTP id w4-20020a170906480400b007a83ecbbd62mr56236747ejq.721.1669893693507; Thu, 01 Dec 2022 03:21:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669893693; cv=none; d=google.com; s=arc-20160816; b=plI0/tKXLAeyPv1jyZ0l9xmO92xK3VOz2S71lXrwloekwX7CZAWRxv0rMQOFJAhnTw qzE3KizW42FNXjmNDxpEmgdNRQz6FCWVneNUGm+C2ZSGG/FuUHuHhUMA/Bn1ieI/UI5p 3Q71xNa6462/B0euoGFsPxp+k5+KDn+JYu4hW+NF7k1kw9i53UArG6vlk+AzU6ov9Y41 v7kSDBopvRvbMP/cGqyB6i7mEzInJc/fUWQhfnsl+emN9UaeyeeKfR01EGvh5r+Q6ANe j+htM2XHbWJlB3US7M3Gk0n6C83IPjy7iQtGGrG3qxvHTbFQj2aSxkQalqDrJOqzGFb8 m6GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NpPt8cctNaQ4EjZBBKQK6ffyEkO6c767+RaaTOUt2ME=; b=zK+/1b07frKL23hWe+WYCmwqVcGLVjXgBbKvMLICQdvf6B93LSgMFsGyx5h7GkDwZk enUbvX1e7sXbjAgQELvApiYJEltXJSw6D8OflvOKZmZDl91FixX2knSMDzgCU9rt2Gy4 E7XCkup2suRwDRFwo9YZYTzGytu2n/otL0+3+Ulbw6VWFFlAwoSEwRymZ/4pi47Dx0OD eYg0NLFxiAsq8rdxPzroQXG+uH5WgViDQlPRGjGBP/wJQ1I+nPWeEThyHy02GvxMsU+3 +w/We3UNGy11kqELqRw+GJsbc0s0K7f3jaMkWsTTPfqhShRdIQDEImwOighA5mKqRfYV D1AQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr10-20020a170907720a00b0078d4cf8de04si3505955ejc.380.2022.12.01.03.21.11; Thu, 01 Dec 2022 03:21:33 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230429AbiLAK6R (ORCPT + 82 others); Thu, 1 Dec 2022 05:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiLAK6J (ORCPT ); Thu, 1 Dec 2022 05:58:09 -0500 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2F4A7CA91; Thu, 1 Dec 2022 02:58:06 -0800 (PST) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1p0hGS-0007Uq-02; Thu, 01 Dec 2022 11:58:00 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id A0C2AC1EF5; Thu, 1 Dec 2022 11:52:50 +0100 (CET) Date: Thu, 1 Dec 2022 11:52:50 +0100 From: Thomas Bogendoerfer To: zhang.songyi@zte.com.cn Cc: cgel.zte@gmail.com, chi.minghao@zte.com.cn, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH linux-next] mips/pci: use devm_platform_ioremap_resource() Message-ID: <20221201105250.GC6569@alpha.franken.de> References: <202211301551252968313@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202211301551252968313@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Wed, Nov 30, 2022 at 03:51:25PM +0800, zhang.songyi@zte.com.cn wrote: > From: zhang songyi > > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: zhang songyi > --- > arch/mips/pci/pci-rt3883.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c > index e07ae098bdd8..d59888aaed81 100644 > --- a/arch/mips/pci/pci-rt3883.c > +++ b/arch/mips/pci/pci-rt3883.c > @@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev) > struct rt3883_pci_controller *rpc; > struct device *dev = &pdev->dev; > struct device_node *np = dev->of_node; > - struct resource *res; > struct device_node *child; > u32 val; > int err; > @@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev) > if (!rpc) > return -ENOMEM; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - rpc->base = devm_ioremap_resource(dev, res); > + rpc->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(rpc->base)) > return PTR_ERR(rpc->base); > > -- > 2.15.2 this patch doesn't apply because it's white-space damaged. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]