Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1531943rwl; Wed, 5 Apr 2023 19:37:43 -0700 (PDT) X-Google-Smtp-Source: AKy350a4PKeHfb4dh4Pv0ZHUPowAHbct1D18Q5sBBczw36OH1mBKKEvfbHqkIT6Cz42RmLi9yb9D X-Received: by 2002:a17:906:9be2:b0:931:624b:680c with SMTP id de34-20020a1709069be200b00931624b680cmr5005586ejc.29.1680748662762; Wed, 05 Apr 2023 19:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680748662; cv=none; d=google.com; s=arc-20160816; b=kagJqnzceU6rPlxJ1gBtyIHwSjsqC3minxPNC5eAJYmZiElxodLBShVMk/NMLQdias M3mvTL2iZxxyuMYg035IULBg4VRRiag25XZ4+IpDldUfv2hLCpS8LwnCosxB40IYR1zh oNYybphb91rA89vHybN8by/FLc9xCoCUqivwg3K9prSsLiMkD28w/hpUCMkeQYnndpVQ qHhw6+a00ae1tvYYDIOPD39xPJKJo25xAGdgELOhWB4B9J14voEmb9nVTz1aputymcC9 9Hdz/4Spbr8sgqlqZ6Y2Q0wsbFW0TqlIlY/+FFcOlh5uSXyyhmO0znfKZrbNI4cIAVNi dLDg== 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=oNSDeipTQkpBoyqEsfCTiP3bjs9kuWJyrl1mgNCdB64=; b=l+QrY+gKmTzU3Sh9VbZCBq/+G8ALULohhoI0NL6Wukunh1W+0BVoncMnggeWoUkPnD KI7wo9qv1Vn8Xre9go9NfLlQQJz/zpJ3OVI/8nJt9nVm2gYiOLilchTA/S0eg9Ou8VtP h5YUEH/f9ygT42xYX5O2GYow17Wr37UaRgKNX7cQisd2Q2QhT8c8l8m9ZqbCxQOAcV8Y n1xVEO1YReMK/so+zCY+bwv2Y5s2i+SHdRRKTa2XlIogmAQgF75pVQJ4lKyz4rXUWFLn VMF7BSkzNCJNkj4J3NBgq8lBuD3OEEFe8ctVAYIMsS+C07dRwG7lhlXSydmrsHNoDlHX npLQ== 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 hb6-20020a170907160600b009332cc3b334si389709ejc.59.2023.04.05.19.37.16; Wed, 05 Apr 2023 19:37:42 -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 S234848AbjDFCfB (ORCPT + 99 others); Wed, 5 Apr 2023 22:35:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233927AbjDFCep (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 10F445FDB; Wed, 5 Apr 2023 19:34:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VfR2SYv_1680748479; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VfR2SYv_1680748479) by smtp.aliyun-inc.com; Thu, 06 Apr 2023 10:34:40 +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 4/6] fpga: dfl: Use devm_platform_ioremap_resource() Date: Thu, 6 Apr 2023 10:34:30 +0800 Message-Id: <20230406023432.124792-4-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/dfl-fme-mgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c index af0785783b52..ab228d8837a0 100644 --- a/drivers/fpga/dfl-fme-mgr.c +++ b/drivers/fpga/dfl-fme-mgr.c @@ -280,7 +280,6 @@ static int fme_mgr_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct fme_mgr_priv *priv; struct fpga_manager *mgr; - struct resource *res; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -290,8 +289,7 @@ static int fme_mgr_probe(struct platform_device *pdev) priv->ioaddr = pdata->ioaddr; if (!priv->ioaddr) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->ioaddr = devm_ioremap_resource(dev, res); + priv->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->ioaddr)) return PTR_ERR(priv->ioaddr); } -- 2.20.1.7.g153144c