Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1531881rwl; Wed, 5 Apr 2023 19:37:38 -0700 (PDT) X-Google-Smtp-Source: AKy350bnKQ8OVCZ1vteYCDSL16//RUknJmoLdVyVpZL+wGigtAhkHYLzu3NDIPHZFSqJFjH8opMq X-Received: by 2002:aa7:d152:0:b0:502:2265:8417 with SMTP id r18-20020aa7d152000000b0050222658417mr3592430edo.17.1680748658409; Wed, 05 Apr 2023 19:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680748658; cv=none; d=google.com; s=arc-20160816; b=GFJwTxCQlIFi/o69YJUtakpCDZMrLrNtF0XGO5/B07W1IR7UM8I0KDTko03P7CBs83 FZBhoxbJVfzQ9Cg5RIx9tjiLK7/nIRUeOdDtTwXxdT7PCv/HHN34Azp7VY8+VIIjxsPm MoapgDCNaIfFsAeNrnwNJS1i2OXQTArWFekXI6amU9HOBAs+89zKTLGmqlPnaXBwEWPP 5D3cpmGWVuBlTwr2MG4p6azLIAIOGSYqV/l89iQ8vaYJmy8/igr7JkcdzLyesaLWhIM4 ZIhHEjPh6c+8OFNMGJMeL/9+oqL9+0znoV6+XiuuhIhYaPorgKJytJXKyYG+vH2W94+M 3bQg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020aa7d98e000000b00501d2eb6957si198795eds.507.2023.04.05.19.37.12; Wed, 05 Apr 2023 19:37:38 -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 S234892AbjDFCfD (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 Content-Transfer-Encoding: 8bit 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 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); -- 2.20.1.7.g153144c