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/m9PsfAPrSI5h1WwBpOgeCXPIBKse77MLDNtno9h8YqGt8v00e7ZoK6Jk4R0YfaknJZM56gy910FkBdawdLFjSkJ9C+qZ90MmXEvoyUGz7m5JVn8SrhbKGn74rjSHGKVWgNUyspRISyhSoa0wX9J5lTOhAlm6NSZ50gRIV/4lcVrFU0cZmsbyTivyWTjrWC0z86YUbeOdXc8WIZqEFcidg9xHBEnBzB1y/Nwh8lnEnEIYerLps8ZfCOqCtOlHAfRJPFKb2OaK+bYvM+p//r/BtQagRnMeH4vJlETBoRmWol8WV2+1jWJLlwOFyVQVdzV8DdEchG9WM5B9RLyf0wmyZ3f0lwfDd6lwsYnKry9yDs6LUmq36+nimiNEKPTbW/RxileJMAj8tJC5jIWCUWq7LeFxWy6spUuZcB97Uc7SC5Gmh8K0AfPOw54rmrV0xJP+m2cJbfSMR3zf/ZcCFY0d+efWI05KwFFl2SaNuU7c2y3ROvKIxc8QoVd7CGedeWBjJL82xMSbgxO7l4avmGUo5K25eQGA8WeJLx8OhH0z9gyA8ZOTjn57C7hzW+Cofhik9Yu6bvJijsxrPjHkTLpgRztSXBFJ/nXutywvkvdD6CoTJtEEaqwvq1jR9mLjEI7g/uk9pdATuExxzoWnhaSkFJ+VcTxsqNIs0/Oq1LIXC8PqApMw333VL2FFl9XDj30jlzRa3szhApgqBK+uAEnJv7kw3L1TlrozOYBw84OX+qNUvfByIqAHUgv5DcTv1sMg5XWbYimQjtjhN4TjhMOBVFIndUpifyj/fU9G0QcwrA+jf8T/gp0I9qlAoq7Pb/r6FjWzV4q/zQvT56GR6Nj0nGHp1pUw1x0l6+5hKMPgF5biCwDJ56zucxa/8Y4cYvWN9SzWYVqXj44rs0XFmF3OlwKOmy1EdnEFvvQ2aKjE28JFnLNAfbQXbhHXAs833HTCFN8ZrZqZdn5KvplimUND8r6DAdpCF5IeNu+f2Ov4pKgDevo3zPQV4ycJwaJLWBLBKcu9f92aYbEKAfkcT1UO4E12KbQ0ZSByApDCX0U/mnGh5y19MfpCL9e1GQSUsbiqx4gilyFnTsfJyUPveqsr04SOum9PukJpxPrzkvEmR6ZV/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); From patchwork Mon Jul 10 13:38:29 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: 117930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5042014vqx; Mon, 10 Jul 2023 06:56:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHhuzfLUJ8KcyK9v26BCrLq0XQ0lykz05YfuiNVBKP70cUZI/cJI9M+n6Qc55+/gOOYoL5y X-Received: by 2002:a05:6402:150:b0:51d:a012:ec2 with SMTP id s16-20020a056402015000b0051da0120ec2mr17061899edu.3.1688997368427; Mon, 10 Jul 2023 06:56:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688997368; cv=pass; d=google.com; s=arc-20160816; b=XWU8pOAHsWNFx9oslHs4RXqe4uePg6d+1TkL4opDLL/qB/w0xE8hxBsGNlKxR0w77G 4ZCo2OMAF9Jp8+WeLYi9jIbd0MsPvRfs95qXoFCLBG+J8wI48TPQyr3SqCcrMIrBbgeS O576KQv79NcJLmizEqt4kU9qIrSE2deZRQy6YZDGS2u65Djr9IJ+VlKKpNx2Jg7zyCtM Sro9gEkUsksoLkw7Raz+qMs93Rpq31jIg4krTfVev4cckI/qPcen0+3HhhW3v29T0kXc dhksv8X2eV4SIbM9xBeKivDZRfgtvwbyRwLSoXyFl3hj6jQO+TGHioCmOg8rZJvZaDlK 1fNw== 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=OrleoFqRlrlpkA9zftySIVdwKeZrEz4wBhsA2wmpXgs=; fh=N7Ju/3mTnC5+r1DBRSHufx1VkyaAiNL4MqQnCv5D4WE=; b=UKaeIwBOoshWOWDl9oVGw4c+qPbfbACUmmJtNCqOm2UBT9HUM4W0L9Ch4ragGEuM8a 9uzzCDX7VMhM+waZWM/a4jD4kRfJ4cQq4cvmoJUzrZn6/6Mjc58fofFzcG/MUBP/Xq1j MJOEWPDG0NoySuMaFGDBO08Ht00egg+/7WwJTD+1d5gcnCuwP5bfoDC+oEnn7M2vh6tA FUCkF3zu6DNiK6tdU73VKLNiL2cl0SzS6KrJFhtcRRBbS4G9Sjf921UshItb/jafnUpj rDvCEarmLY12T+cG+1SgyQyxsLwIETqwTi31PBEmsbzOdOKmZcHLqMZRcrLK57/YHcWU Avtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=i8RmKwzM; 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 b3-20020a05640202c300b0051e1654f831si9484625edx.453.2023.07.10.06.55.44; Mon, 10 Jul 2023 06:56:08 -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=i8RmKwzM; 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 S232894AbjGJNiz (ORCPT + 99 others); Mon, 10 Jul 2023 09:38:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232383AbjGJNix (ORCPT ); Mon, 10 Jul 2023 09:38:53 -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 8BE75BC; Mon, 10 Jul 2023 06:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ih6I+pzi0JFAep1lG8NQA/09YIwaO7LlxFG40ZMQxSMIi1wNX2BEtabCJJc5mf2qNq816dXlzKOXfZ1MJykLT+iKs+zvmdAPgp5MatBmLr8JIZM9xXc7B2KapbLCmnlTk86DJYJsCQyVIDeS4vr9RkJ53hXe9pDtGyiw2hvjog6hutiT9+bfH807fYW2XtL+oNdMckPHH4Oe6zEWnxk/onVbwNkWR8KGFjRJF5cEBWoy+V04owNJA1w8HKOqhNYF4o8EbyQUaszWptiihtWsNYaZehWGvvO6Rptg9yZrHSXIvAAfF0nU8Tltq1B402W5E4CM8L5+uCVbn8qMGOQYug== 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=OrleoFqRlrlpkA9zftySIVdwKeZrEz4wBhsA2wmpXgs=; b=KvG7tbk731hOHhCLTsIbqWjnaO1ExgeTfs1KYzh4BTPqUs54SyZuyKtKegccnJDCoS7qiOqdHsbLYdnHe8+W00EIms2gRieGvQhX6yRFTDgupSnvwTPKfh0Rn0AJx0892Z5RDqS0vn+8oMLSGsz+iCpxK8zcz5XzGIAmUZWHsLQDAdyCpVQLYBWRqQLbQrBnJu7PcRXEwl7wsN9affQbOi1EhkEKgDmPo3z6w6q4krAAhIU0UjXceW55oPg2BI89OhtrvSgTXJxf5+EMkMYlmOtjrrmpuIxjrh7uWjW/fXEVHWPNQPyoFZ2E3N8KX7eHeMr3LYe62E4EAal4Db6NVA== 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=OrleoFqRlrlpkA9zftySIVdwKeZrEz4wBhsA2wmpXgs=; b=i8RmKwzMc9TPfuyb3hjkqXJrAHC4S6n9NARLgw2bITaVnQNZw14s/4sZ7zU7jDJa/TKzfkea8T264fhba0zj1mf7yZqdOHeuPMEoQHyDFo30qPePaDBH/+Uaz+6B8G5pBn7oWCf4Jxgpsp/R65hQWprbgfcoFqiuI+7v8IGR5Gozfvh4kuaqY2xZpy21XnoUSfipdlDGkw9NRH0RyrgiJlkIV5piGsIjmwPX4gccz/Iz45dKLeflnTdS3Lx7q1c1ydLiGG9d9JtU/ErEPAJeBWJHFHwPKQhhQ6YzqhD1tHs52kEbaESO0Dr4FqvVvks+95e1s/wouQNyfKk7EjFAOA== 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:45 +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:45 +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 2/3] fpga: socfpga-a10: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 21:38:29 +0800 Message-Id: <20230710133830.65631-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710133830.65631-1-frank.li@vivo.com> References: <20230710133830.65631-1-frank.li@vivo.com> 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: af66a250-d67f-4bf9-df18-08db814afac2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qlobQLh7qDsU0Xf9GrHBqPjguow2RzrLVTeGJYYZqB48G9fw5L4Ksl25EFxB7NpYwNW/ICLEhTzvmL2029z+4ep/rJ3hkf2OkUTDbiwAaqf9OUnUPUjj7pQxXkRuI6OIwoO2k1Eke6Zoaljm7GbZwO6Lhue7L3DoHz7OP7WRo1mreG5wjusb5s3jpNUtpYsYWNPovIk0wwTG6Edu/l5ADQ1NLjhk8bTgrB2Tl4/zbaaf4Rz/7nwdD8VkjZi79LdtRT3FlJ4GB8+ICEiyBGXQcL4wgBcfWRE9KhSgOjZcv2bqCZ8uD4LcrmoUv9+5A5O2/SpF+v5yUfOIoSddx/uCpZp0gKbmTNrjySlFBl4HbPCAEYsZ/cKY7cbxzecKrAM89w0XD5gmcUfgg7xdfkPP6/diLdpfGO9V5bIA50rcHcY7SpIYAdAUkxdYouFM28YrhOYJUlw2jsxNspMGXyYcE38kYm97cggRC1/ea1DYTUPTwfnipPO8sBNwO4acTY9+5L/RJbzePyxj9SsANB+pOKelqfV/lj8/ARLiOOYd6K9C5Pvlc+2TAXFkCbVViSJ/BfkbzmW6VOyFHITv84STRQMgdzsJOS5fTuM3eKuaw126iKpvkMoqTIpiHBKCNax6 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)(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: Oq0w6evc7Ug4YSIKKM9P9F1geLvUeUAgE0Ad5NI3DxoMBya7wUol/gFlACL1/yBpzVf2XYkFhqS5U4wwqJeuToQrrTptjBpBnmXe6ndW6zXlAwW0Ev7LebCP8j5s2Pm4eqC8sQj3sJDbsBoxZD3qXOal7zwZuCqDjnDNDsLqQmz7NYGh4o5hy6oUrBpZ2JqSrpMEcejWmbNUZ7ySP/cymHzk7OVWZjA1/60a1IpMIrXvGCPV3p/mLC7bPqACMsfl+ydg9wBw2/dGKyvOWxmOXMANrWEzViPX1NLWmhVeXVjRZlTEHWK1u7V58MnGcIw25qrlLYbotwpAsp6GdYfa73M/jAOEhFlngcIS5E6zd8ClSIMEEzKEF1KdaRnFuMtvM+CAdkOvZJkDyXHOrroTy7UXJ8ASJQcWDJnSNEsqs5fYkH8mPGijng6CBwEwVcsLs4R2xUym4kAxZ0pDvuFj8SN7dj4BrhKmxfZ87dCjLkwd3QyC6aVjOrRUx2ExmaNdSs7IYwNT6InHPakrZo11s0b/U1B60sl21ONZFwj7xdsrO3meMUPwQu8dCkY2eMrRU4EVcZW+JPRTk7R7hfyvu75uTR3vNbrpjAkCiocXIAYHr+gmAbnRS6PwB+f2H6JKjerc3oV5pn8RFGg/tpSuh5ZQiPqbg9MZ9uj924mlzDUhOvKUz7q4xm5zkOSUsLOkhI/n/gRL8UIcptqLRok8DWMoWjbV1aawgWXfkih8tkIQI88jh5wHuFKe4eA14u8S/pmbZ8p/X1bz1MmxAMq1hf33cQ7hZCR4t1FqrN4x/upBavAC6LUcqMIsKzMKo+50V1Y1nQ7qzBBcynJM1xgun1terLxuw2sV+yFLYVYJsmXaz191AfJDVaO3Hov41RcWoYGhS/e93TRX/xCWGPVGYbPf0lihcPDecZvAT7jBHgKGz2CauQXduseDmMN1NuZ2RztYgXu/yaLWnYjT1vauLdniUHMB2LE7zJQqdSFZycXDv3cNB+a1ODWS1a4jpZjRdccSx89wO5sWCyWVOHXH55lhA08pSaRU+epQPvQ6ymOOP/WzZEZ/VG4ddAGqGNpZ4280QkCozvNiU2+jbZ4VrrFILsjf3NFnezj05f2blL/uLfAhn4ZMZMReLHLJAzNDeadFp4qtQD4vBmdn/31QOJgnFZ7G5Rotk3LtNG2thMVgPEZB/mdqC9kT7FyBtT7VPn/FmI+RJOhvVXKUHRcWo6EodjdDbmBaN5ZrsBLgWDK3QIa9+/aPfxUW6sfZcNI9TW4YGREy8hsCGgFG593mT68wCwDuBQSs+vrDIyKM1zXUxn6Rpl46czF4h3/KDkPU65wL/7tPSJ670wc6XEh6mH8YchZQmPTEByftsGK30gWDvNadGH3T1kkYoFfj+AeJWX8OJMePmJHi7522sY5ZfoQ+X7IGt2eRyNm1Am/nQBSVzzvK3jLgSeJJv+Dgismr0J59Ebb5SF8A7bTwRJM4AbAke9VG1BC057mPCR7pACNM3g0dYVHCRXka7n9GJDE/Mn88SlUTtedhfDzHIM4j3GGLnSVU1gTuDMXMpFI/QLat6nPLvQHxnUbn5wfedlGZ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: af66a250-d67f-4bf9-df18-08db814afac2 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:43.9769 (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: nTYWvebKy+nMz/I/z5R/nOvhKLxFaMYXNCiAtppChDEZhrRQIWhF/ADWHeF5BNpBfax8+Yw5xPYJQrn+8SCfww== 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: 1771042104701550672 X-GMAIL-MSGID: 1771042104701550672 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Xu Yilun --- 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); From patchwork Mon Jul 10 13:38:30 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: 117935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5050207vqx; Mon, 10 Jul 2023 07:07:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlH4qf9JIDJmNOk7SrqJ0uhnWIKFaWy/OmkDm/bpfgw3Ae5neRh5CFmm8akmPOT4lXx6YQJG X-Received: by 2002:a05:6a20:186:b0:131:f504:a5de with SMTP id 6-20020a056a20018600b00131f504a5demr1179285pzy.40.1688998028400; Mon, 10 Jul 2023 07:07:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688998028; cv=pass; d=google.com; s=arc-20160816; b=fo2/Hi4gR4R9aucI732EaQ7xBKnBroa9YNkrFb1QMX/+r24WAJtmUWZepCSk26ROMF jjepp9tsvZpSMfKLhnj18RPeMOsqUr21e7aAFNY46uDCC3H3JBEQ9QVLKuuMvqQLF5Np 1ubpN8PrYZGqScc3SMZo/bwF6CPh9Hk6SKfMaq0hfYbiV9oCFM+Kw9xI8ZFcwZ6IWi2x QxZCs8UYtIn7mqvVuUds+2Rmi1p3ukjUMYOojscZ6fVBii/aWj5kyjGc1cC7LkkNXIlk CZgh97c9eIt2Ekk1YifU0AkJ8x3cx4PZn0wrlyxnL1Kf0jrEnmpQtwXJANsH9H9/3jt8 5U+g== 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=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; fh=9SSJfqESPsYcKa0W2RJ3zYVdUB+ri9KRxjhfugFnNW8=; b=wQ7+NTyTGuH+MQCbJzJ/qqHhqdt9tG4UBil6QlELSVh2AyM/MBzjT24ZIjk3FW91U/ tzuS6FnCzZAsggQmxDzx8v+qsJQqs1GYOVp3nLy0Hn7Xkfc9JN26LKC+cQrJuHUSbbCi 2JSB2EsZWRCJTjxUM7xuNn8E/LAmOBCkW//vDgJ5N+4ZOd/4k0V9PmY96J6jFVui7E3l afUEuGLnM/+AG9TCyrnbcfl0TDlVS1ChPW/EGzRvVKmGPINYpMJ0+9We06vBw45zuPP1 iTGAYJokcuy7USxCAwlUEBqqOF7nuBl4aLUlTiVWe5hmOjhvH00+CZMPVp/DPCrfpgr2 RIAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QeFgz1bb; 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 j11-20020a63230b000000b0055adfd71daesi1914615pgj.663.2023.07.10.07.06.55; Mon, 10 Jul 2023 07:07:08 -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=QeFgz1bb; 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 S232938AbjGJNi6 (ORCPT + 99 others); Mon, 10 Jul 2023 09:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232761AbjGJNiy (ORCPT ); Mon, 10 Jul 2023 09:38:54 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42BE09E; Mon, 10 Jul 2023 06:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+cEvGl/3N9BoZ5lWHmYN/gQ1kvDZW977K2ZZbNeVbH7uLQV6zsBUSkvxbMjNfrzkTXTzXsuqeZINHGbwp+MR1J1WwDkVSKDKjRa7NfBf7pm8j9dzHFX3mGHgunQNeugmr9CvEiy3EnZIewPRnXHPJbUpsf4AlxU+jqufQQ0JgT8IaTdOBortykiUT/bEhmf8W0Lk7GQsrEcD/OpYPCzcF1tnIOus0DOdYsZEWKRtgUsdCsP5maNWjc7uJWHNLD3UlyX23AtPao3bSXf7ZnyQZogo+vwtphSTfrGjiIBkgw7RrHEt1BDPkq2k25Je33lHm/OMy22YFyvn3kxJWl/gQ== 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=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; b=ksZiVN+U/BqH/9emuAgogyrz9wpUBJImHDJvDPW1FLI3JdFDGs6QOOxNekI0FdkTlm4nrYPQ6F4MzUSbPAv/uQkzUomo/TZTcflsEo+dM59o66hxuoVaEJOPIh/6Xf54J4vPDiuDI0E4TYl7Ou3YqtXepPgx5q+V/9i8C5t0Dkx8f6JG++eByZp2e36SkvpuJ6OuPfzmv+pmE9sXPWFr5l3kVKmJ39GXDae8NOBQ9rEwY1ZrfJRmxeuvULdI7sxLvuLhMwWxO/hxba9demQJwql87qaiylCW+SGI8zpB69Ix7E3CxpLX84XGAv8vfV2AUyjB0KCQNCpiwejlpRURng== 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=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; b=QeFgz1bbxrNJEvaUu1zSgiqZXs65HNNWM+wDXEGYHC2Wz95dSIGt+14W9wW+M5I9GDEvxN63lR0EG06eJjfQVHcgXe/oUZyykcvAnmTej2/lco6BhuuPXO7md8Y77rX1NmgbFQCrADqAvFzUqTT6QeT+nEyzE09PRwVCcKlqTA0UBWleCH50q3c5V4ag3leWyjUbExr/RjtQbMI0oQHu5Ax4qJ/y7LYD1TXGoiC3sD1gfrj+O2b67x09KlFqhvln0X0iBe7CdNEOG6n6qLEgiJr9fA9ESli6cvIQG2I8t1yQlcS4pTnYTC5r4p6LbdxMTBVxyJUklVatxFqmsayvig== 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 SEZPR06MB5691.apcprd06.prod.outlook.com (2603:1096:101:af::13) 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:46 +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:46 +0000 From: Yangtao Li To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , Alan Tull , Greg Kroah-Hartman Cc: Yangtao Li , Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] fpga: socfpga-a10: Fix incorrect return value of devm_regmap_init_mmio Date: Mon, 10 Jul 2023 21:38:30 +0800 Message-Id: <20230710133830.65631-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710133830.65631-1-frank.li@vivo.com> References: <20230710133830.65631-1-frank.li@vivo.com> 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_|SEZPR06MB5691:EE_ X-MS-Office365-Filtering-Correlation-Id: a2ea1440-c5b4-400f-aa1c-08db814afc23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UWwYlIa65jARA7dQEe2thK+PJmyY5Thybxz041NIpNo8xPdRjiRDKucqfRMh39t30FF1mFDOw5QTqWvmWdG3JV0WgXdf14UjbK/ZVRKm1AYrC8UPhmJqT8Wu7MLf1TY/llkTHnFxpWBQ41xXW/yungjcvwlgPGD6A/RDWauYfql26O9kD9W+yffk2eyU8FlwzAmLM4auySejcCN5BCVuAGHsni7l1p/OJMRdEMTbnlb1aUlrcy77UVTAqKMdbCvDNAw7lyiQT2LRQo3HB6jZbImg2VEsdQ1BJzoJNGSf/jUHcMk8UX9tMOulz3GWK0z/ZGoekKQhNsO9r/kDSj5xqMQc6AGOLccQZ19tphtsw0BE6+8JxhHahjypeMyPHdTet9FDBirBNI/XZi4LpmMmFfYaM3jgA7fCIMWqxFiS3nqe3XNKXIjMrTGeZr/8nT72Y9rQh22KWc5w0O7jvsEJKMC1wtTcO915pbY89mRplavjjyW5TzEQ3i4oMGVOV34Jqwc3/toTqeeTEHvl5QgJVat6G2+OgGI96FhXGPbk+GK4JWKvyNdvpr3XIQTnis80q4YqY77YJ6+aCA8jqsXFVuUJDR1Ir4m+LedhQPH566/57qcK9UADpGZ8YnMe95EG 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)(346002)(366004)(396003)(376002)(39860400002)(136003)(451199021)(86362001)(38100700002)(38350700002)(36756003)(6666004)(6486002)(52116002)(110136005)(54906003)(26005)(6506007)(186003)(6512007)(1076003)(2616005)(5660300002)(2906002)(66556008)(316002)(478600001)(66946007)(8936002)(66476007)(8676002)(83380400001)(4326008)(4744005)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RYK89IMncJL0x7pOI/YhHpKXf90UqYI5YYRK0fga0cwilwJZVftCKS27GevNfaXJvVwLr3Vot6xBOVCAyNmL+OHakaZtBx5QsxMIV9sPJw1IjKzvpijjrTK7FgVu7uywtZ8gFL0xerIdV3Y4ImVxieXjW1E83JacD6XJCkFY5Y5gP/iSdl6qGXEJtdnmgj/zYhtUczElSuTGSoZoQAIHd3wVVvZuhHY08o4flW5q/ZjeRlJ2Gej7+WZCpROoVlMvQe/e32Kl0as41QOXAEzrNT6wQ5Dc8vFD4T8JhV5zLRhLD0H3cZSgLosZMK/q4dXB28jHraoIPxNS0nRaeY5bD9UWjAAz4Mu85Ee4PwODB9bhXj053VJNcki5TlmJDhFmF5GXcjIF2qvy+EeFmaN9GrFUrKedmROEquPRNjb1uGIWh0JH/w8xuoRQX8P5FOuTIXiD3ITT2bPwoefYnkhoMBheuV5N+Z43XgnOKLAlju6mou99bDTR1H/+8pU2Jrd8JLYklOEWpPXHKMNYZ9GFAsBAf8aBgEbM8CtSLJoZw0NiRHc4+zWNFTpGHTl7ssGHviObIhNXndUAH5JlRCaVKDX7aRJ3edFLDm+qyNW8kUATTRGPBtmAyFipdxWTbJaOCQkDsZtRSwJa+7f6ZE9HZqeqF+YVXiiOuInbUc0S9wGSxnGcPf2vZ8xZa3dAuljNA1f8cyswTcbRPpZjqdWTGr4k6cvnwMEn70dfF9jVGqVd+yqmv37P9GqZLWFCQMJjMAD8HGjtGB8SNPBizATztmpUafqHDC204FS20cJWdvnlUkT7ECSt6RXwDEsNxU4zbOvoeFETpq8dTisOLa1IEblIrrHLPA3vtJwJsiDcWb/EUbQZFMCB1XYXUykYwS1dhBXB9OW6YttvKcIv6hyX1EIP2lq1rgJo4chSzQ0TdyaNggYntnkSSB4+rk61UKbhspoMp1KDGlhZZ8vKu9Sr4vq+aQ4H5AhqFdXtnu+yeswJslYWvnpZGBuSzQrVv0QlFWHJ8GD8maRgXJx2qMf0H7zkdEDb5iJDsKoUp8l9Ysia781Ah1LpI5G54iHp8QxcXv65q2SVI9H44WvUM/se2XBzyqxAk2jp2etmRPHtE0Pjor9OWSA7+sAJzLONoqNG7O5T7bWz1v6l9NftQ/vhMc9Yu/012Uut597h4xVIPsVjAMJGLeUkRYU8xR5pz7XBbo3l+H6cactHAazV2VxHUyCfc2TmqjppGvLfazgNmUetzqEbRn9u+wKNpbv+6Wdc2H7MjDbRk1Kpa9hOfy6m7x9ymWLeqWXsl+uUgDmDLd8PcYtXohhsV+QDq0fsEX9rDjfHZSuUdG+Oic8a7COdEsLHgQth/ZLZ24i8xPSbQJIJBhaF2gqO2Nptrc/NyioPB0jRZqSowypIPRGCzBMXeb6DqesP3n3f8Iu7Ng4PAUj+OmiEI1+hA7impx+XgGXGYmXGD0YF6v88FNO4uHmdA9jFoEVaFSu9X0Lle4q3Rtzfyyb4ybW9TQSKp4OUzPDz1hAQyJjAdcdoT0/EV8Bd8AELQmgHwCqjkz5oqAPtmAnfC/kBNw5aNmnoOFw1Tn2h X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2ea1440-c5b4-400f-aa1c-08db814afc23 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:46.2885 (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: zN13aynZKfvenEymh0X8wn0vt6GnKQo+igqRuNp7tm1uK2lVVqTQLNie2+fDbzNMLWu1Qbi+mjdQ+yPWuEZq6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5691 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, RCVD_IN_MSPIKE_H2,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: 1771042796579498713 X-GMAIL-MSGID: 1771042796579498713 When devm_regmap_init_mmio fails, we should return PTR_ERR(priv->regmap) instead of -ENODEV. Fixes: acbb910ae04b ("fpga-manager: Add Socfpga Arria10 support") Signed-off-by: Yangtao Li --- drivers/fpga/socfpga-a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c index cc4861e345c9..b7b6e0bdb3d9 100644 --- a/drivers/fpga/socfpga-a10.c +++ b/drivers/fpga/socfpga-a10.c @@ -491,7 +491,7 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) priv->regmap = devm_regmap_init_mmio(dev, reg_base, &socfpga_a10_fpga_regmap_config); if (IS_ERR(priv->regmap)) - return -ENODEV; + return PTR_ERR(priv->regmap); priv->clk = devm_clk_get(dev, NULL); if (IS_ERR(priv->clk)) {