From patchwork Wed Jul 5 09:46:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1752303vqx; Wed, 5 Jul 2023 03:00:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4/yqYKVUWpim4IxY4YTcTfBP+OX5KtlECjYDhPRYgz282SDXu5IpUl2ZeAqScw7UJKc7YX X-Received: by 2002:a05:6830:1e2d:b0:6b8:6ce6:e7dd with SMTP id t13-20020a0568301e2d00b006b86ce6e7ddmr15608812otr.8.1688551239744; Wed, 05 Jul 2023 03:00:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688551239; cv=pass; d=google.com; s=arc-20160816; b=AkAJK4K3+UDKecOhTfMadefOT7uNxex+1o8sgofpSainHAkeq93QYWIGv9fFa9fL3T F6WLNG8+y4IPmKvqMVk+lN6XzW57iN1UnESWN41nZ44wxCQCybc+meG5KcxIAX/vnilA xiCyN+exRBUq6ZzU/MrpKMEOBenzvax4qASSCRz9dBVVF569BaYBqi8ghX4qfbBN59Ud KLAViUu5OgS9L5KNnk/VpA5vv7K8TYWi/bBlIgC+GXK4S3ngonZcXWCIzMo4oMAXh1T2 oNvKmAhcUN0wBzsghcH/YQ26nc08MuQ71gLq1mq5CK/enO2ZJ1HQUtxrr/5g/14DcHMZ lGjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ntc0WA3RegtqQnRTN0Tly75aTIgb1dBhmrZVsmV7fVc=; fh=FeT5G38czCxbFra8wh3CNM+BAh9ogjZ+EeOzujh3CE8=; b=AiJySSNH6sP0C6tJ8ihCSq1hXgtYkkOVFZr9pM4XjwaQjKojAH+A2Wr90GeI6p/m3d ZQxkuTd5D28ovRmCpIXRtcfvIwr4PnnKCh/ScCqbM3We9Fj2/oiFlh0s37Bp0jNCHjSN hSqTU2BRSbmytyKOrv0R4Nn52nWjuTRHzumHIA21jmg5j+qo1aDMdDSHkEC18r3/nmVi zajfKhy0SVSuODdDXXMLemKKdLYcal3M/F10KUTRRr74HbEZSwdjDVHActgAHl0BlFr5 wWy4IC2b/TAgf8e4vgtpo+l14e6ReOgS1gcraMFYYGKCDVdj2f7YBBX68vDHexcT4+e4 0qhA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=g1GEXn3s; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a73-20020a63904c000000b005572b13d228si22436502pge.277.2023.07.05.03.00.25; Wed, 05 Jul 2023 03:00:39 -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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=g1GEXn3s; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbjGEJrQ (ORCPT + 99 others); Wed, 5 Jul 2023 05:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231613AbjGEJrL (ORCPT ); Wed, 5 Jul 2023 05:47:11 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2108.outbound.protection.outlook.com [40.107.255.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA215E72; Wed, 5 Jul 2023 02:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZkdZly88RIkGP4LRi2K++CoolxI93ZcVpdDz7ln05u2jJZk0f5C1lmtSPu2aPK31FsnEeLQpDpqqlRbtEGVRfmDIHsupuZRqiYv7eRAmpHJ9iCDS3fUIU78n+teXax9rSziuKjXEAE+3PXsTwKm7YB7JMRzCwCzKB3BolXOi875CjWsrxoR6x4UZ7hcRMO3Si7GWwOjtEs0HIWazdh6xWD0WOkoPOcCSoH3WkprI8hlmwBKhZajCKmAdzuduIg8zW5fB//7R/oRcORFG1+sl+eBZ1ICypEaULjNvjLBtUYS3FyW0jo1xfZMZrJ77cLgidlaLDXjhRR5olVStWDgynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ntc0WA3RegtqQnRTN0Tly75aTIgb1dBhmrZVsmV7fVc=; b=LoqxKpshUTJXIpudnN8uIbhSPDwo/q6/+HY6gQo9ZyND4RqvuPT6HRdSMpHecdCRadO0PafnyOiExiYfd8Wg032ykFK80rVW9v3ynnFjXl9VleMIDMEU/UFeHGktA0vi0tpETiAqtkV6vsvaXnK7sTjJo0aOAYi2tZOk12Uaha4sjfYB3E88sabTp8SvqJOdeyHsSfIK8cUU2aysTErOpeGbX2YibcPpPbkgD2ikYYWY8QGp7Vtmp1RtZbRgGGEzo908YtBVoT/EPqWqPpzzAm6lkBmHv7zemj8gHH+3A21JCn2H1ywCT89l7n7F7ShLUBAtMpB3xd07S3WVH3F62w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ntc0WA3RegtqQnRTN0Tly75aTIgb1dBhmrZVsmV7fVc=; b=g1GEXn3s2ptXVTrizYRi7lHIG66DB4M4T3WyKpV5fGEqfjFzdtrL2NRDCBiiQcRMBbaAf0AxFtDyO+kj553ZDXLoUgIQO/4cB+CbuWYR8ytkmyQ/SH77WYg1DF0EMaVXJH5VUPV6tqHRcZNZNMEP0fXhE9rUTC9gkBELl3bbIyTDWuqEGII2qv7/5rQLUhueepOlENyHAuQCUTPLlp6gVloed9oOzg/9u+50cIKzSfg/DkmaAwtBL4luMgMZjVeuevFqpxVBrGwno0Tauax49P4vFbvPwn1hxWjl28mtPNGhvZR1fJfXziVE2H8nsOZkcdQWEckB3JS3MEI8m1YgYQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYUPR06MB6219.apcprd06.prod.outlook.com (2603:1096:400:352::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 09:47:06 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 09:47:06 +0000 From: Yangtao Li To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix Cc: Yangtao Li , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 17:46:49 +0800 Message-Id: <20230705094655.44753-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705094655.44753-1-frank.li@vivo.com> References: <20230705094655.44753-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR06CA0203.apcprd06.prod.outlook.com (2603:1096:4:1::35) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6219:EE_ X-MS-Office365-Filtering-Correlation-Id: b11eba2f-af4a-4710-996a-08db7d3ccb4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IEyMpcsyDtT18+u0Z8bD7r1rriaYtjbBuoOcW9amDk2mpXYE8TJH9G7jIlLkl3xreG6oZJUvkJGFPK9Q+4h14Q6J8unQRpoS3iNJTn58fbHhJV+tRHSFvby4MHeR6VjKknU0m7mskuy8Qxs82fhzEzjqUY/ZPiGeFtCoIZkGHWEGD4acuMq3cv6GZTSMldSAEV/6DiBswE72VMEPmTZIZNrvdN6LPvUenQsuIaxp+budfjhD6QiarcxXgmsUhr134LtS8VCTIb3j/GZIAb87Q5BXDtxxTjkwoBihEw1HYC/CuxgHTNzeOvAmia+Dn0bRA8ejAfnEIgYPK4ZWt7n0yAYoygDMuO4gs4fMB4vYwojCxNJdlVpZ6tYJTNpH7YAuhXYvqSgIc24bHNyCVo6CRAbnHhrk4mSG+Jehl3ZXa4WzwjmHywxzYyuaOZnOZuQFNb2lqDF2zTl2Dk8VG2LYws4TqXGVi2mHK16jt/JAHPCnCPtQGp1H+WcdwBTwmQgnqK/VGbaZO26oW23cBzRz3Ud/fN/LlhuK1IMCt7G2wzOLFTouAgCvc5aQ/0rySt3s2wCPn8bv+nkjIlx3Gwq6wY3Zcw8gMUEqB7UlHF8CYp2Ya8pBGisWkZzmH2Hbbgbc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(346002)(376002)(396003)(136003)(39860400002)(451199021)(4326008)(316002)(86362001)(186003)(66556008)(66946007)(26005)(66476007)(6512007)(6506007)(1076003)(83380400001)(2616005)(4744005)(2906002)(6486002)(38100700002)(6666004)(52116002)(38350700002)(5660300002)(478600001)(8676002)(110136005)(8936002)(41300700001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1sqWD7EgQiMXYirrpZd2KYE//RekrBOK8tTl9Puasxoj5mCou9GUjmEzCz64CFZ+cW9W5snz1/OnQg60INEayGrojvRPd5nDlCZDUCkMTLmvAROalk84a2b8jCmRSE3DCpPxVNjHlW+VGLlq2x0vvp6O0ciF6oPoHu5XzGqQB4qLILfXjpuhqiHuV2FR0tczMIodsjYrr0xiJEZrTiI08MUNYXo9i2qA8cicGNMvCb6EjjIziaUj8moNoaWcLXxWrYwVc04hUC1fOLJ7dIgME7VOoKRxGy87/qRGg6CXNaLXTHDX6/xcmivssmAhwagn9zR4BnrVVmtrSKqRmUnC2SVThqzK3I768giTg/CjMyO7Ftf8oKwjME9lnsj6prBrPRQXdMz6lfnnGjSedunWM9fp6EVSylUH+VNY5DnANRqW5VIGgtCOqhDS0Ygn9lUzBnr+Xu4jvOa45Uh7TdvcV/i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he83ENVe4sGadikAxPWnrWt+yXrhjE4Fi3mOOdWxe+kYAVU1/+VSA7b5zSf X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b11eba2f-af4a-4710-996a-08db7d3ccb4d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 09:47:06.7575 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9sgfkXj/suhFhXli21R0naLoZfF/eZWCV1QzqTzaI9HUvx6BJ6rzKrJGs4ownjVsShaPECPAJJLmtW6PQDuYIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6219 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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?1770574305059932731?= X-GMAIL-MSGID: =?utf-8?q?1770574305059932731?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/fpga/altera-pr-ip-core-plat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index b008a6b8d2d3..fbeae6e68f60 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c @@ -15,13 +15,8 @@ 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);