Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1532852rwl; Wed, 5 Apr 2023 19:39:00 -0700 (PDT) X-Google-Smtp-Source: AKy350YfiDOgLQP9v5jUU4ngaUBdRZKydKvxNsZqA3tBf85rrx+GUq5GoyTlz+XqghsYDSOYjFGB X-Received: by 2002:a05:6a20:6d87:b0:da:2d16:db89 with SMTP id gl7-20020a056a206d8700b000da2d16db89mr1538400pzb.28.1680748740197; Wed, 05 Apr 2023 19:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680748740; cv=none; d=google.com; s=arc-20160816; b=lyQmPEgq+Fc5h7/xK59qMSFrQ3+FmPuGJ5Np7NKpVh9ohgUWM3bLQH6ZKxeAvzX8lw J0R4ANSYnANDdo/QEkF9oxAzu/AFSSBp6vZDimwsFc8xqIvmmixL2+ach/6uB4RzEmQl eMMZ2DUpKp2LWS9Iv0Yg2ujsSF+icmMcBNndxIDAUZcT9j71Xt/csRZDyffgMF7B1ffL kTSh5v5GuBvOEu/axwZrXhHf7TcQIhaKrL+4QAfHw2Rk8qCLUiFuVj+QhXaUoFRKXhmN 5V6r5dms954bSdtRsRupsJSxNq0Yq3F0AILyyEj31W5tCXY15ZdhI6UxhZJ9P0L/JVmb DIvQ== 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=iQFzlS0DNzYvqO8l/cLnCcGayOrpAvm+f7a00xcvgYs=; b=p7gH5uxaemCL9ELDu4yQpGnFK7E0nLDeYSciA5I4mEmPcTkv+QpwKiR9SfiLYrFrXp 6e9SxAuYHjSjLO7Z1TOxRC6taKJn7U3UJU6Y04V51lJ+HD3PFu0N0+6BRfhS9AtVIsXH 0FcWRohwbVulLdjr1NqOuH4OAAZymtVSMv1vaBBbG5XGrjvaKK3hyYwCJP1WUYUz/fUa V3zVeSJzavwFpmwXwMZiHN/NwB3uLNGvPRW6GlDx0as7hWxwXSE0KGhtxsjMNzws4E56 TbT9wIN6kUJbLpLn6YEA+JKbYdrs8yhCpjQDFTmI4HP6cT5CtMkODhGtQA/6/rz4K6Tm bNSQ== 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 g202-20020a6252d3000000b0062a28cd7c1bsi208256pfb.264.2023.04.05.19.38.48; Wed, 05 Apr 2023 19:39:00 -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 S234675AbjDFCe5 (ORCPT + 99 others); Wed, 5 Apr 2023 22:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbjDFCen (ORCPT ); Wed, 5 Apr 2023 22:34:43 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C53A5FC3; Wed, 5 Apr 2023 19:34:38 -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=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VfR1.hw_1680748475; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR1.hw_1680748475) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:36 +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 2/6] fpga: manager: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:28 +0800 Message-Id: <20230406023432.124792-2-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,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.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c index 7e0741f99696..723ea0ad3f09 100644 --- a/drivers/fpga/socfpga.c +++ b/drivers/fpga/socfpga.c @@ -545,20 +545,17 @@ static int socfpga_fpga_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct socfpga_fpga_priv *priv; struct fpga_manager *mgr; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->fpga_base_addr = devm_ioremap_resource(dev, res); + priv->fpga_base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->fpga_base_addr)) return PTR_ERR(priv->fpga_base_addr); - 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