From patchwork Thu Apr 6 02:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 80036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp729262vqo; Wed, 5 Apr 2023 19:45:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aQMrDsMMSnAOvL6wmvE5Zox1uM68k1ehr2GSwt+UHSxQgDb+80Aka217m9fMwcIICbwOdf X-Received: by 2002:a05:6a20:7a86:b0:db:9726:8e46 with SMTP id u6-20020a056a207a8600b000db97268e46mr1217039pzh.54.1680749115633; Wed, 05 Apr 2023 19:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680749115; cv=none; d=google.com; s=arc-20160816; b=QR7RtlVVmDi9reUysEg/6hXTYECgnO2y3gh+lfkyrGaURlO1oYwau9bTmOX2CUSMZS vez30g5eu4pQH3mCgBo+US+Cmov5o3XDN6/rIdK/ZOqfKGS/CSViKrpeMrsC12/4m8AH hZvdNbzVrbKv0T1046aP0AFEOxgY69kH8cENl48Y/k3AixW+Y+SJw3rcY+LywLSw6kec u049yBJKpe/rmoJifVmv3rjiyQIfLY6nx2x3kdVbHyeKvZmBaKmsJpfXybpcxVuqMcgO 9UlgzICzFwRm2mCmh2KxB/5CcOiNEJJosONiJKrM3R7drpre1oXtXtAWQ6aBux6GCROa Dglw== 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=2NIx7aNv36QdD5SQGdpOEWKhvYvJv+XUe7uOBMYKMcA=; b=cFq7UdpDJk2OI3x9let2sIX36ltbDCXn5/PJHoOQuDInKCEhCx4gwZ0mSaBCdAm7OP QNCabwj6zZqj/JuOP/+VssMyCuC5jUzj4siLHZAJgZ/y/3M5vPuy7f3stT+ELB46ppP1 zVQebz98mKql93Bsc8hfE+Gvo70Mc8tWutaQBwDmHs5CzQlaHcvjLVd74jlv8A5MvoQ5 sEik0ywA45ybnogjPNA3rxqlVcn3IOLfbtflVw3a8oZCBYbHtAbfbb5MJQ5Amf+PPdC5 3toyoLE2vsv4YQVjqdtwqFlzasJ3sv5PxK6XohY6DR/jQjY7/m5ed8e8bY1j44zMnEwD 5bbQ== 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 i17-20020a63d451000000b0050c06b2361dsi175773pgj.72.2023.04.05.19.45.03; Wed, 05 Apr 2023 19:45:15 -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 S234898AbjDFCfD (ORCPT + 99 others); Wed, 5 Apr 2023 22:35:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234033AbjDFCep (ORCPT ); Wed, 5 Apr 2023 22:34:45 -0400 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA485BA0; Wed, 5 Apr 2023 19:34:40 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R561e4;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_---0VfR1kSd_1680748477; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR1kSd_1680748477) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:38 +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 3/6] fpga: manager: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:29 +0800 Message-Id: <20230406023432.124792-3-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?1762393184570219863?= 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/socfpga-a10.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c index ac8e89b8a5cc..cc4861e345c9 100644 --- a/drivers/fpga/socfpga-a10.c +++ b/drivers/fpga/socfpga-a10.c @@ -471,7 +471,6 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) struct a10_fpga_priv *priv; void __iomem *reg_base; struct fpga_manager *mgr; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -479,14 +478,12 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) return -ENOMEM; /* 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); /* Second mmio base is for writing FPGA image data */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - priv->fpga_data_addr = devm_ioremap_resource(dev, res); + priv->fpga_data_addr = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(priv->fpga_data_addr)) return PTR_ERR(priv->fpga_data_addr);