From patchwork Mon Jul 10 13:38:28 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: 117928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5038265vqx; Mon, 10 Jul 2023 06:49:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmt3Wvt8+K7z9gkCoLZkYBcStGLucqiSL1CVwOFhk20yoFaD8qKaniB5c4fCgFSyARSpf4 X-Received: by 2002:a05:6a20:7295:b0:12f:405d:c4d0 with SMTP id o21-20020a056a20729500b0012f405dc4d0mr15532310pzk.54.1688996970617; Mon, 10 Jul 2023 06:49:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688996970; cv=pass; d=google.com; s=arc-20160816; b=1KvznFtV1RHnkRAZ8RsoZC3sWejryKaOqv6LI9ibVBhcd33ISOsCojsDgklV8Vqkht 4n6DwWZGEwbvqYiwkO/A9dK6A0HCkYkcP/iY9oqY5MDXmJiQ2MIuD1v+GQdinMIe+Zgs 63MO1yQB/nRpYKEoWCeFtvDuMyH03Oqjs5Pn6DRgJgJ1kW7pGz7qZ7ZOLEog9JNz5jr3 IwzLqUaIsCOduBC+I8B3qz6nJxNV7ec3c6g701sm+QycK9ym7blzgUU5Wix/4e30GFtv YSeFpb09468MLGAHHnL+BdwkouE250U/4MfxBHCJ396qof/934b4ubhL7lKg0Kvk1jfl 6iqQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4w1Wimnk2eqTVF6ncwVzEltvFbxGwNzCAiyCOwi/gP4=; fh=N7Ju/3mTnC5+r1DBRSHufx1VkyaAiNL4MqQnCv5D4WE=; b=FCoMHkP9EhmGqGNJNbNV+LsHbg0Fx4/V4h1jEK6/QLNeXaT1b2ah+ClAiMqe6DH2n7 f+ZnUVtzyMyaLY5yJbIN2TaRXADhy1EBYDZNDfs0S+d1xdzhN6g0Nhlf2gePDephkOgu wDKVndH4UGqf/1SE54VgRzHYQlWB5ATZ9lxLztc+owBNidVE2CZdzoTP45FbegWk7+jI 8RZ2C7Z80hTBdR2ZsjLdcsG4MzHbHsq+0vSMWYvPF6yEqTn8+r3OXtUdVs8SHWSTHFcj wleHnNmf0DmrarmJ05sVQLY5ZKBy00JGHg/T2ZsBkCLrMn2ayc9mnEUivvWvwifnVDuD DJCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZrR0fihT; 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 ji5-20020a170903324500b001b8a2a800dasi3732203plb.131.2023.07.10.06.49.17; Mon, 10 Jul 2023 06:49:30 -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=ZrR0fihT; 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 S232952AbjGJNjB (ORCPT + 99 others); Mon, 10 Jul 2023 09:39:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbjGJNiy (ORCPT ); Mon, 10 Jul 2023 09:38:54 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on20717.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::717]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6012E9; Mon, 10 Jul 2023 06:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G1c0GAwAyWqm1osqlzqDDIRGKMy+W3uxtxVP6Pffem6PVO9Bf2K2k/yIDDH79bdbu9sCWUat3DIl9fFOWZ/Y8BUr5G/6pDXVlXTjV2QOiItJX3PuayAoeVejqepTe1781pFPcFe0ArsgPIIo77og7NY3ir8e1AppIUMttdR75s+lSgq5jbVP6233JYCsdCdVKJpqTz5lzRzJx9E2cRqOoIxLPCOtOiFAn1BhT1NoqMxc/ci3cKUixY8LjBKK7hQrQpdKjoK2kHXdob6cEWgq35s1xntskFmrJ08t2TCESNyKeH7fs4zvbLc+cnxomQQmx6Ppded7LQaGRlK/TXhM2Q== 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=4w1Wimnk2eqTVF6ncwVzEltvFbxGwNzCAiyCOwi/gP4=; b=j8qbAvjxJLM6/AkAF8FevP86iNbAK33JU0db4uJaGtoqqB9t2qVdLaR2Me/Ml/hucDuIo1RaDDFhyGk2p9EpaZaVCziJGTO/QfgU7ywYnhjAnnVjizomv/z3yIAZJBJC7LcKTUsFuSCE3bu98VJnOy8u/t3L0NZYmdsNiuvpRQ4j6nNeT+4gXh9+3UNujUlsEAkcZh6PXobVP/OW03lJgEUHAsk/kXotEyMfJZANH73Mbdjltb7wmYk14IFBVaGx/UHxEakKGMP1gu9Q/HJYtAO+ZXhJuKrLWc6Lzdb7Co/VNiYxZE+iVIlb0AseHDi22cQjB2wqvFvQdgj0ALZ6Kw== 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=4w1Wimnk2eqTVF6ncwVzEltvFbxGwNzCAiyCOwi/gP4=; b=ZrR0fihT9n7Evr5hoyapS1BE3OAkgIjZ3QFYFLcoqbg19WT9k5ITeorL4et5TshxgHmdpkmDlieja7XtvSXJ01LBQJrY1K2f6RtHOkqvG/nedOP6RGPxckFIu6jtve6HDWzUdREq0Y7mILYd7GP2TRQ9VEpyPavoxPvR52/jqVD5NpYc16irZzAU0mWYsaxFd+Nx1pW0Lov+v53oihekyEu9n5OPYc8SU5Cyv/CqqGmgTBYdnIvaSdBdTfD0EtWkLVZ3oFhVccqMIJ6ZWl0dBB6zp8hys8G2FzSlzUtIJFK4XAjur4svwUtO4e+tKcnZs8NnV3JFEqWDvqEsJprLhg== 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 TY0PR06MB5594.apcprd06.prod.outlook.com (2603:1096:400:32b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 13:38:44 +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.028; Mon, 10 Jul 2023 13:38:42 +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 v2 1/3] fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 21:38:28 +0800 Message-Id: <20230710133830.65631-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI1PR02CA0048.apcprd02.prod.outlook.com (2603:1096:4:1f5::11) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5594:EE_ X-MS-Office365-Filtering-Correlation-Id: 0aaedd47-bed6-474e-884f-08db814af977 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XPN2SsbK9nYJE0oFbOhKOlj804cFIE8/mKwQwqF+iHvlbbhgPXD2fVwAyoQwLIkx5eiBxIfGOpA2mLokdg5EjOaKCSYd0nQbQcqwUwapF26YADZnP+0auYLZf1rQqz/AWyFYfUAoYdwzdC8yNZXxi7wuB/fv9tOPIhRj4q3WiT4KB/obPci/cLxwkaIRbAYO9XmHgWUVOWOl6PXYd7M09tBHnWqVGEpdXKOWgWcQfYfe1DWgGgn94rds9ZYGDoHmzwX6V9TXq5//zpfQI7hzxbDCiP/YrFFkzHoE62ZLxeA6AsYA/uqvCpUzKXW7kuHkvGDlSSfLDQCpaPJ5rXXOAXLnEraMynNtu/IhqgcHnhAOz6ocuxTDLiscKA2Nuh7ZItXJxypvJ/PqEXWOzd9ZBCwwbmOnqm9CI1E62qlEp4RknmhXELpiK478EfikDn4Xmwe89pTNHUqrQrp0ywrGilnPg1swjUnKqxX+yXoA6qzVbkEbKEv4+LQ0Uv35qsoZPR/XBfiqU2KPFduPtlrdJewzpzPWb3cBR5L9eCR7RwzEUnKJ4LvrKQL6dvuBZGOrAGQRG6EAAbhPp3+ENYhUQj8/P/ftHvzcy/GxRtNCptl2nx4TQ1dWRNz7kuLebwHN 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)(39860400002)(376002)(136003)(346002)(396003)(366004)(451199021)(186003)(26005)(1076003)(6506007)(2616005)(6512007)(83380400001)(41300700001)(4744005)(4326008)(66476007)(2906002)(66556008)(316002)(5660300002)(8936002)(8676002)(478600001)(66946007)(6486002)(52116002)(6666004)(110136005)(36756003)(38350700002)(38100700002)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZzU5v3snO9MYj4fjvaVmjzzoxGiP5oZGDvxJSRIg4DvIGUc1P2XOJ4WqGpswiGhiyWhQe7WqJOa+4OhPJRb6Glqi2um37oaKxH3uRjp0FoKgiTM1kWcWeKPA3TvnxxoJFvjdFs4eKGWzrYNpy1hRd1wPyUO7ZP9JNcFAm4UJGcWma3R9QHIbrfqGhCXOjOf18212LLpctrhcJz62dM23KIFf230/bu1aRbFIKtZemA6CaYG87jfX9LsL6mXs9kiT0NQv4T+bXQtyG03LId1FR/q7uuRAieGEeQmkH18Fiey0EMkZTO9obXXuvbG8gK1JrIYumpABfEgKt8JRghm9C6dF8TiXOewdOOKW9AkFgD6ACPAicKRHHIz1KzhWB6N9PKF9/pY5m31BN1/32FBJBLuHHrZ0DHHIYqHO4wDgdazZ4dqC5dvHlVL/iPLLO33r/m9PsfAPrSI5h1WwBpOgeCXPIBKse77MLDNt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SOum9PukJpxPrzkvEmR6ZV/jA0aDszAT37qqK9ytu X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0aaedd47-bed6-474e-884f-08db814af977 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 13:38:41.9658 (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: ixUVb5TbK7U16UD6Y2mWL3nOribrgAbARVgNjDguCx4QkThkN+HB33vBcTYqa3nxK8R9oMv6TtwdpB8wiD2XFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5594 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_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771041687845863427 X-GMAIL-MSGID: 1771041687845863427 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Xu Yilun --- v2: -keep comment drivers/fpga/altera-pr-ip-core-plat.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index b008a6b8d2d3..06c6a4721205 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c @@ -15,13 +15,9 @@ 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);