Message ID | 20230704133726.28861-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1230643vqx; Tue, 4 Jul 2023 06:41:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Hz9hVA6v2m9/07evZnlumTirhduJWZ+GLEQbaeMOuUeQXbgSWl3HIt+4ngOoJswMmoozt X-Received: by 2002:a05:6a20:4408:b0:121:7454:be2a with SMTP id ce8-20020a056a20440800b001217454be2amr14784876pzb.45.1688478080615; Tue, 04 Jul 2023 06:41:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688478080; cv=pass; d=google.com; s=arc-20160816; b=KD+Elo601SXcSPJG8xj6bS3N7VzRlphsm7Reo4kkFvagXUd/79Z4XLMjCG2pfdEx/A WRDDbpoLrkjgCVz9/G1i7U98bBdvQvmr+zfPRDAwQQUByQD6JNXkLrj4nnr3PMMfAznx Ir8DE6kuYr/0pEqTBPS7sdaIDzKK1r0DhGqDsnoefEBDAVIiKESAN6cwBdExHVeVdYQ4 9AsYP33cD7NgXsbLe4IP5JOnO1bW+0bX+PGY5MmT32LMzZJrLr/XmuNnZpV4EwJcVBHi gvuNDYYrCcLPBqg76/o1SwPwu+VI74iZasdchjuGjP2VABQC+98D3GnTt8FVG7Wxtt9N nlqg== 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=wCATtVih/ccF98JyPH5yiZMXmA0DvBmONiMcBdK0iLQ=; fh=yi5H8jOn2nS3ES9MXWAZ4dfq12flnrqRaG8wJzLjeGY=; b=cwdOC6hylxah8qsHUGJwSu4E5ltslhOjLBhb4hDS3MGvSXJQz7ZwWLpWM0kxxPihB0 inPCs58P5EQzE8/vkyBZrPUzu1DO9MUXw16LCiUTWiHHzcNySLDg0SuIvbJnS++AELtq VJg5aHjHQfBv8YF9W617/OIWPxDt/naRhKQ6rIdNYZWu68XgkaR8o34A37DABvR4psUK fSs7F16FlanHZ2pFPpVWyDl4FAsfEODaCHk8Qq3o7/sqAkdLwC+HnA3HZAvWr2ekvxSg s+2DXkqdCXi6u3X+ViR9RKDLiRoJ1+W3/QzCfPMGvWUZ6xQajaMA1hVpy22mqeTLfCcd K8wQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Rg5JBv9g; 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 q17-20020a635c11000000b005538fca55f5si20115907pgb.874.2023.07.04.06.41.05; Tue, 04 Jul 2023 06:41:20 -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=Rg5JBv9g; 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 S231561AbjGDNh4 (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 4 Jul 2023 09:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbjGDNhv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 4 Jul 2023 09:37:51 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2122.outbound.protection.outlook.com [40.107.255.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A5710A for <linux-kernel@vger.kernel.org>; Tue, 4 Jul 2023 06:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UlHg4kjueTyZUIXHopP6lmSmr3NMDKtU+o2G11ww3rAUAGdgUtwAScDN97rLsiSL4IRo3Krk4f4lD04WTZhjLQ4jE3KwtvEIi1JTNma3hQVVrplll8fe8Q7uLCdX1APUpY//d/+djglgYJb+ViA2Q7c0PtIzjYRkWn0dYU2EIep0yn8JwW9zq5JkvNp81MZfTt+tgA3EFpKal0s48UWubvuO6FhchHS2pTsHjjjxJ18w7rJOLkDZSFi0Q78AzLY5eQ9zlB5uPcbEEh+yWnRP3xb4eOJnGV5LBIfaxbssa7EnyLGIYe782jRR18zHAmZ2VzNqMqH6J9+B/mHTSsL7Pg== 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=wCATtVih/ccF98JyPH5yiZMXmA0DvBmONiMcBdK0iLQ=; b=RKHO6lMGSx0opIF0fk8I9XTHMx7pX1rhT2Yz9FAU8euFZL471xYTYYRZeFbvQ6/c99m7cdp2Qn8peNq0SNnDked/9MqzqkXjswaYDrC3ET3MGvIDCDJmWkbxcb9FnUh3ayT7acjeM7W2pC+gWaF5sSY0KjFOWyBNUAW8OSoB31pQvEsrGuz7rHY/GmCXQAGm0qmEkMAzSb6g6ftgzrcj5Xznk2a0aOXvle1VK8fcE+RuCdNmSKNEJjHqtEAwS5BPGSVgpSS7wrgJBSFLAzUQlAGWdfjhDuuqcWlgaLpyWSacCXlLGIQs7yyInYulI4ctl/4d10kEzT27//MN6BVbag== 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=wCATtVih/ccF98JyPH5yiZMXmA0DvBmONiMcBdK0iLQ=; b=Rg5JBv9gOGu7x3S3NmQBjdbNNVECIuWlOSCd7QEPX0PAsSYa1WZRWGJzb2eRb8QFYgNN2zmjIfhdlmgWN6BqGxRvgOYsFMStepCeqQCn48SLSiG10AXPMRpwRL0NH4XEa3ekXGO9WUveeJoE+KmT1tmrnQlQihkngJ/EsAa1or0BKmoDYofYzyj+DqkQXAlbl8vxFphyHQLCIB9kWNogfjl6W7H/zUqBHapVp4FYyXRafhk9H1SDQS2Chpkl5CTxcTI4MZwnX+QgcrzO85UYhxcO4Pctb44hnlYlODiv6ZeD9vv1miHKgheGRPwMIGy9WwOOC2P7TtwtPCmOkr5P/g== 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 TY0PR06MB5708.apcprd06.prod.outlook.com (2603:1096:400:270::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 13:37:36 +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.6544.024; Tue, 4 Jul 2023 13:37:36 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jassi Brar <jassisinghbrar@gmail.com> Cc: Yangtao Li <frank.li@vivo.com>, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] mailbox: bcm-ferxrm-mailbox: Use devm_platform_get_and_ioremap_resource() Date: Tue, 4 Jul 2023 21:37:22 +0800 Message-Id: <20230704133726.28861-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0034.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::21) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TY0PR06MB5708:EE_ X-MS-Office365-Filtering-Correlation-Id: 8023868d-baa3-41b5-f46b-08db7c93d38c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eZOt+cl/z9tMuUKb0gJGCpZfgCea1dnZcsJKaUYJEoZVv/OUIQ8/6RFLACf5LrzU45Lbd7fzgYcZr2HISG4L60WfuSqPXYiVn7YXEQqjA4Oh5emU3+LggC2OykKpte/0uzIC9fhPsk63TGbAypMg6RJ5AgnXD06fbmUOE5NoaMyvwHZ7fbgqeoUybRyExmmjy+L/Gwa97H46vz3/oVRavi+9SIeyePmfYlq/JhIcYBD9uZHRpXvk0oWEj79biCjZcF35aVdlTwi+9ISKCZo1BkVDAfOH4UN5CXWpPgk9XW9PvdRFhbv0R08tZMninenIAE1qG7tvUaDdkz7aSwbylgOcrtNuuWivkyFdBQR+O9XvR0e3EQFMtDs0Es+g6mUQDB7Q0vzcHFRABLeQ4EPw1vo/aUfLCNSUOt/lScXHYbM6pnRkAKtATAOtZmGxj0FIrA2thMnMC+2OBbkzdLsvJDuQgN8it5ybxHhJw9S61iK/8YbcS63ZIGZddN+NB9bfOQizoJKxhxcUzi6JYPqUk/ucZewajbOQUJ0KwIN1sNJtnhITiw3x/rsDLEwVPSuv4BPDvzNxjrGI3ZAYMLQbq1sAtuFle5QvSyGM2GpkfSJdOOnQBpbfHIxNN2ZZ3f3s 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)(136003)(366004)(39860400002)(376002)(396003)(451199021)(4326008)(316002)(66946007)(66556008)(86362001)(186003)(6916009)(26005)(6512007)(66476007)(1076003)(6506007)(83380400001)(2616005)(2906002)(6486002)(38100700002)(6666004)(15650500001)(52116002)(38350700002)(5660300002)(478600001)(8676002)(8936002)(41300700001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /F2bLMxa5wtFbVaKIA3dxaRCRIBfRngo8Gh13sV7v3ybD02cGetFNsdKUoa3GN1kkT09/wuoIq5XYjVdlUgDzPT0yr6XajSreD8n7TVlNx/MFjQ6T60LnRGTvqbuiKgsp4njmMS0JHhZEQHrBP7YB1GpPZnNai3zPKT//OiBg9p6HGfUC4pJe3pcdu4+im2OTFIY3LtwivlH419OzyrnBFNxAmvr/tektlHDiZ2VuihKLpXuH8MVQ/s9Lzo6DJdZ8Ju304qb/fiRqPph9JzixBfT8TGyUcPlB3VBv0FLYwYtlvQrmUiADar7fg39OivtnLXOt3QIlRUgshjdJHOoHbOMNYJ2DRLQvvqayLLWdZZZkVDY3Zfgf+E+NWTK3cNA1/M/7ckUPuraSlCwB5EHnWF3LsaFrFzydHAetpyoGYKQzFBpLoZTQwQIe1hQP6GdB04OWQSsh/rlHUvocnRM0we0CxLVgRUdYr8F3jQC1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2N3tIBvKgw7OzRvPPN+ks4uR/DaYuHVV9mLl X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8023868d-baa3-41b5-f46b-08db7c93d38c X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 13:37:35.6466 (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: xyoiBjgSt5RVpmIdd393sUeeK+GvM3cE/QdKcGZGL45w+CsaCwfTRyvAUG6wKq/yXztd+JEANkPBFYFfrNseVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5708 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770497591940239047?= X-GMAIL-MSGID: =?utf-8?q?1770497591940239047?= |
Series |
[1/5] mailbox: bcm-ferxrm-mailbox: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 4, 2023, 1:37 p.m. UTC
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/mailbox/bcm-flexrm-mailbox.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c index bf6e86b0ed09..a2b8839d4e7c 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c @@ -1501,16 +1501,12 @@ static int flexrm_mbox_probe(struct platform_device *pdev) mbox->dev = dev; platform_set_drvdata(pdev, mbox); - /* Get resource for registers */ - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + /* Get resource for registers and map registers of all rings */ + mbox->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem); if (!iomem || (resource_size(iomem) < RING_REGS_SIZE)) { ret = -ENODEV; goto fail; - } - - /* Map registers of all rings */ - mbox->regs = devm_ioremap_resource(&pdev->dev, iomem); - if (IS_ERR(mbox->regs)) { + } else if (IS_ERR(mbox->regs)) { ret = PTR_ERR(mbox->regs); goto fail; }