From patchwork Thu Apr 6 02:34:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 80033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp729148vqo; Wed, 5 Apr 2023 19:44:54 -0700 (PDT) X-Google-Smtp-Source: AKy350YPpWZqJIaoSd+Kln7IOpVuShS5oR8tKMF+y20BaQCc6Dy+Uae+f+8WUBoUOSUCdgGU7Fyw X-Received: by 2002:a05:6a00:9a9:b0:62d:c459:bc52 with SMTP id u41-20020a056a0009a900b0062dc459bc52mr5580089pfg.11.1680749094212; Wed, 05 Apr 2023 19:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680749094; cv=none; d=google.com; s=arc-20160816; b=KWhzaOtj4oJQ5dIIhJGHFzSOUygiA1qzw6F15W0I2kIiII2nzyjEmCIDJjLB7jx7wM 7nerr8+BCWkj/tEjiLvr29IfEtFYBflEXfPTFI8q3Eg5p50rNajfn871Ces6u3UFAg+Y ercurL+qjtcg19W98najfo0O8njqjmLOsHsptXCuTPt9yxEdQvnET0haxIBdA1Znn3xD hpHgdh4HIMHdy1JFFeO3+4zuTjCiyXkX39eVzma8SoUJ7UPpU4FRMDrnJRxtwLwNQ3/6 JCQp02T5QmLBBruUmRh2wlD//aEHi1BB5x5KtjzNs/k82hhZzXv7ivnz9Ig5tMTgxz4L R5ig== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/JtF/I9lHljyAJ7zPGNTtKdgeZYphMsy+80BZ5EFWNo=; b=ELWPRuqGqs0DPxlb9nWukWmnqhEX38+i2w12Vr3aJ4yM06IRmP26romiYCk1nPFtGA diFd/XDc36boXZbSjpPKGiA5JxRiX4caYJYKiJqJzKK+jtq4c522H94ColgquXLCFHmT OGepa8uB/JllcEdfco7O6SbfBCeERJ15UrZLtApsUGfJqwcBZYrGrLbmSzOLh1XXbAJY D9V6jzuOiJxdNWhyH9+/99p/Lw+fAT3vBXfgmTBAG61XW/2aO7A0fpDWKgW6YZSRnyJn t4CJg2qhgJoxJAA4hHakKZWXfB4ofxQWutfcn0AtZDK88EsDDQ8iZAytunbz+xixAeer 8IbA== 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 c9-20020aa79529000000b00627ec453561si268400pfp.99.2023.04.05.19.44.42; Wed, 05 Apr 2023 19:44:54 -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 S234814AbjDFCe7 (ORCPT + 99 others); Wed, 5 Apr 2023 22:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234280AbjDFCeq (ORCPT ); Wed, 5 Apr 2023 22:34:46 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 696525FC3; Wed, 5 Apr 2023 19:34:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VfR.WeI_1680748481; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR.WeI_1680748481) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:41 +0800 From: Yang Li To: mdf@kernel.org Cc: hao.wu@intel.com, yilun.xu@intel.com, trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next 5/6] fpga: manager: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:31 +0800 Message-Id: <20230406023432.124792-5-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20230406023432.124792-1-yang.lee@linux.alibaba.com> References: <20230406023432.124792-1-yang.lee@linux.alibaba.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762392744450592630?= X-GMAIL-MSGID: =?utf-8?q?1762393161946912496?= 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 --- drivers/fpga/altera-pr-ip-core-plat.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index b008a6b8d2d3..a4b26286963b 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c @@ -15,12 +15,9 @@ static int alt_pr_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; void __iomem *reg_base; - struct resource *res; /* First mmio base is for register access */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - reg_base = devm_ioremap_resource(dev, res); + reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) return PTR_ERR(reg_base);