From patchwork Tue Jul 4 13:37:22 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: 115789 Return-Path: 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 + 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 ); 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 ; 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 To: Jassi Brar Cc: Yangtao Li , 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 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/rlHUvocnRM0we0CxLVgRUdYr8F3jQC1Er5jEnGvc9IXIG4BCaoQ4x36jADUfEqT55jXbqZyZViK03xg8cniwLgB8yOLTe7DhO4KLnBjw/8PV5IeDwXSZSqksqk3cVAwqR74nnFNM9vgX8Kt2EGytZOnLAIgpCFybK7QqfahA2/YTeYOONA+iInM+9CZ21KMUWPx/oNT93O7O8o/PzQMNGMpZQekAWBWW4XzEgm6RzfYcQmHaoL/PU1U9zUowsNCBoct5ImXL4P+kB4I1ic+AFNkcvU+zNlV23wXwh4X8+qwT9tdj3XKA/96yHf+6V3zkQExfTGsS2vHjUYZxgROIeEORIuhwkrrNdRjIh/8E1etYR1yOVr7XSlKYst2MSWd5CiTo9fXMvUw5GQWWfzSyLEm6/M4hpH3CTg9rZ+H83g76mLCkGCmUrZEobeL+T66+Dyu8NL/VmkAYtx4Ju5NLoLlgdGduQ7GRxGWE8q+DRPydZfkBdMO4gbb//dvNKiJ1jzGWiA40USDnqGXsMk+ufCgjyEOvRXWyBy/b/62AH+mhopyXkUtf+bwXHciUkjkQYswwaIQ9wKpbQ6wAqcEoDeg42PjGd338c+OnB2adi0bu2LRmoadsLRP2rbdass5WxmLT75vWKRgnXjoUEv6o0HSXPuhRNCFszsAspkMLZhn87Qfhuf2Zfm5RWb3wnewPlxWlSM7/aaIeYC0b6YSE8OLMs/1aDMXxfFsZ8mtc90taanwjUZ6LO5+vbY3R/edeOJpqNPC8oMHAvv1W00dRF9Idf2lsfFkcPJc/Cl9o61bfOYDi/YMiKIZkXJ1rEDeKV/+Ii9VKc98uWU5WwADyOtD/gOB8H3DCkMcGGx3Oy4CaJPRimBi3mI70Bjbdv0MitIsttlTZ6K+fPGMLymY9AWTcsUMfisI+w+lv+IW269YKgD+QhWvTQxvnyfsoCVyvh0y/EftK+4CWH8NA/aSyisnMttL3ZpE0ONzwVxrUbBNQx+iqhuURjxpEsk6Wi78z+I9/O1Y+2WZhQ8u2J7mGiyotxKO0J3Oxusm9R3f31+yFNvc81ynlWeJpVKsnWPTNru+pUT+Bry4F2pSTrN2N3tIBvKgw7OzRvPPN+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: 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?= 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 --- 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; } From patchwork Tue Jul 4 13:37:23 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: 115794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1234895vqx; Tue, 4 Jul 2023 06:48:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEO2QVGDRIQ+qTlnuntMBigSzRnPXGFlNUq4d+Rcnvf8ECIcfWNO81oJ3jhfABecXQrWmOy X-Received: by 2002:a05:6358:a1b:b0:133:6c9:c43 with SMTP id 27-20020a0563580a1b00b0013306c90c43mr8020322rwa.30.1688478521752; Tue, 04 Jul 2023 06:48:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688478521; cv=pass; d=google.com; s=arc-20160816; b=lcOfkY4a++srpkDkst88yTo98l+hlRi0Ur9KJShxNR+y4VIehSnX1aMZpuvtnZ1jzJ od3HKI8H9jYLHj4WFyePF06x856HANliYROmyzJPKT4iIpOtKHfEQ+jPWcbyYg5yn+TR qhBJtR+MzdzDILHrSJbP5NLrNRb7fvKpBcHCNa7tzr/oFQrP6TurcStSlUCJlIbpnwa+ aeQjevksBRjNjWF4mkCePa1KV5hN6U5QJODk1uADl6hm+PWQQs5qU9SjwhSmtWtLs01L eK48ofoKK2xx6jkjc8ZvKhlL73xID1DYWOJz4IdFuzkWFeHv2NwmzH1LeficSb+4Ds9F 2tIw== 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=hJPIRECYJn09RPhsMsgoeJPDjegjbkvDGII+htDGeqA=; fh=yi5H8jOn2nS3ES9MXWAZ4dfq12flnrqRaG8wJzLjeGY=; b=uBBahycKFOmAvh27T55gSn++qy566SZcRcUBShzDp09bp9wUz2ftzecrGwxiDwIcwG jaVHwdeX4cJ81RbC/FoL6epRgnrbd7H3H9gpp1SaOAbs66IYUCFrO7Mhitu8LjQX8Ysf y1sidB3HzeM0JocRnRhyIBWXGr6TcRbLFr5Mb00St9HViTJrAWNWDILEGmtg7VfrzLa3 UbUzKBb7lUcZ4Ah+AGmTDKUN0HrSJcZU7348yayDsxF1i7V9uQ+q7yBpsGBjT9m5deud Sd6LnlODWZXLSSNAAyhgkQ9ZVmIek6hIJfYrJCSnzoMHQ0t6wRztNFeS2lcF7TnX4/Za mxuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VBZwbxDO; 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 az9-20020a056a02004900b0055b57fb4b7esi10800678pgb.725.2023.07.04.06.48.28; Tue, 04 Jul 2023 06:48:41 -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=VBZwbxDO; 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 S231252AbjGDNhr (ORCPT + 99 others); Tue, 4 Jul 2023 09:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjGDNhp (ORCPT ); Tue, 4 Jul 2023 09:37:45 -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 803DEE75 for ; Tue, 4 Jul 2023 06:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RUrlHEqCe3vrNAicrkPOpqKCJkvtbnhQQzhL/2qOSzMtjcTFYOQG7scKh3Hw51XPG4Qsp8dnwtAqXezcA7J7bM9IfvzP9TPRkKj4JVukW4GgwlmUMvq/9sj6lOKm6C+koPKVRmiGEDUiCGq/tw2F77xPIeXsGkArvqLSdT7odgY254qOtLfxzyy0eKK32+O0gSWL0NAr656BvUwpxBsd+xcSaCFTmL/L09PLQuucHFiJZCl6dw4iAr+EqSqGi2Ykl8Y2soNh53oBY9IpTd8fVQBa/9h3qfwLXB+S1KoCw4oO9kNlsw+S7IDdISuSNVuU1Iw93Uv9Rz7BVAVrFPczUA== 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=hJPIRECYJn09RPhsMsgoeJPDjegjbkvDGII+htDGeqA=; b=UbRIy7ktMazrC7e9Qk+ST75l6hd0Vz2uE1cy6IYPVcNkcdw6TZBp8EOif1m9wV04mZpekK8VYkavEAZlwNxEl5bOJnb1U21EEcCYoy0yHQrktGLg8cfdOqvCIXsjpxQcx5EczHPsbymqvHUzsJv9Bzdk1VlmQNJQxuDzwc3RdrtDwNLjoPERPJi3BGFNCWCG6M8Avqbi8syR1mloNqULDAP1q4H72frVKR6JLrGrwfAn9GglCZ8XDlCqLB1M6dtVO7kRlJ8Uu/uqgaqS8iSRlGx6enDhIDrz1UKV1ch9Gr98C5KMTsE+njgQhKz+5nop2UpTYq5R2kZDcxc5Wf7NTQ== 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=hJPIRECYJn09RPhsMsgoeJPDjegjbkvDGII+htDGeqA=; b=VBZwbxDO3YoSde1i8f2s/1LkEgUDcFglBtALkahKzUEOf67f8BzuT09qvlcbwUBPkWsGE3DKLpSVSUQpEE4OK/WEqg4sqlZVsMNOJjnxNhe8DUhZngRwmt4TYSt0TIF2O9i1CJVxTwC/XCwMPfbhNgKk6Q7MzmRCSuHxFr/687SuPBiaTnefkqMNWGFeinFfhZis4M0/b3RrmI5WYzJ+lroME7trjwy8t2lBm7CZkPM6cWFGw1xrayfRDvXhiHs3PJpYATBaPnprX+lxRIgTMqXtudeaDg6GHjJ6GuYBULtoifxWBIobYQMYgnhoJgGQ0rz4pyePwrV+vA+TTL6C3Q== 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:37 +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:37 +0000 From: Yangtao Li To: Jassi Brar Cc: Yangtao Li , linux-kernel@vger.kernel.org Subject: [PATCH 2/5] mailbox: bcm-pdc: Use devm_platform_get_and_ioremap_resource() Date: Tue, 4 Jul 2023 21:37:23 +0800 Message-Id: <20230704133726.28861-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230704133726.28861-1-frank.li@vivo.com> References: <20230704133726.28861-1-frank.li@vivo.com> 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: 58486684-175b-46f2-53fb-08db7c93d47b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yq0FVlDTHzRYvUMXLE/0X1JnJeVjGpu4+x9MMw5rmXqoTiaRiDcPQzHgYCEvy6yYiQr7IGiPBhxOah4O3DDsmBmN4qwfHDF1irWzSNBZ0Rv6U1nx7wpgvxE1L1C4bJ95hRsLA0TjTiloiFbQUrFCQ9qAhmCjaPY/YXJbX/72fs9CYcpcPvrC6GlOjjmKfOMtHKxh0NhTJaNm7gpC6exD/I0fYXD5BxKOk2JENt2UtmcmrB7gd9282AUXZSP18YBfV4/N1Gk4xuYGfX68H0ItFhOuUY6VWMZIOT/ZsYFAmnMpb6ZuOIvy+H1vxqPCeFl7R2UDZfAlTOZDz5v5PVphMxf9yICRMJuCI1xepvdKsdsvgx/dhAW+LqQKWU4fuUuCxa0xqELrg7o/+LpJ4c+SE7BCyeEY300Hj286u2A0vOlYsCdPciVwKct54HZ8O8zURZgWpNxBF9MxCADPSQDjFacHyN7lUbSIUEBrgV/CO79wbxUxmKDtt8uYZYyBOquT+YdY9vFTUgufNLaqbSzgqGgrpMR4vkpHueoHQH251GFId0KMYM6YqUds/SIyP8AoIJXWauS51kPPVLh/j2jjSpqIG5AcFkc7a2PeYp8PoCuNv15e8aCrtVe7T66w6qBk 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: Uy+RoMvBrscefefaOTOqZOf8ywPy+gqWlJdvDHyPb6krHwu2VXP4HUIry3NwSFIXhUgBWEwSCIGZvwdEg7D1TtrdgGCblcmmvGfqMVy4jM98Jf0XerB7w3CptXZvDlO6HJ1GhCHHt6sCUESDmcBNQAyLtIMm6FInsP80YRTH2rqYyPd2Ntia/llkkf1T08TTD/i5XgPuDh6UNoicKu9aI9D4qCDIwfvdlF39c6AuWQ9aP59rQvn+PqoZSBJX89ZIEno7zwvEpabHB0/yYfUWTqzNEjH26+w06j6j3E0Wo4JeuocfP8sbOP6JLsu35E4jbDR8OIZrz4t2QUgLlVySW1jHN55yFezmG1Z0b8vgvmAfmSM9u+V8OjyES4EBCL9yJ/GEasf2TFaclO2J6L7f0lDP4H+QbFoJ2eeni9QaCwEvWUcZFDyo3Oa5LktXj/DWOAbBLNzorUBT5J1ixNz35MdC+QaI0dUAHL5Ly4LpS9Mu7V0wNi9jTaqOB7YrNZYd+H8c4kXW6aSxGOFBZ5GVEtyR2ePbYfDq097zGwh2Y+R015AQCbXrgmK8WBNu5d9wg2/PuLlPGuBIu0bUsZJ03zm6c7X56HfXnYtgIXNYcFNesh8LvEDmAoD9cdESjZQklbEklp/dQtZnqab37aUqxFOnGwVuriK288+MtrC5K8irhoh1TVhrNIwMP66/t6RovQ0L+0Zp+xhkLAKfyPzkkY1klnsLU83wiC1Jd4KF+RpeJTpKjIWinC2IlQ7B6APybLGh+LXArVMYwBOTK2LwlW25Qa26HCD6XbVQMTV1jk1tQviOQ5PiGtZaapsbhinu8H0231Lxe+81YWvpGVvhfptMaDITIraAk54q8p4BHd10DJwkWO10lQfU77MLWgj2mWC54Vn9Saq1iChtvzYKzoBQTzoFAavPTuZcu+E8Cq2t44UTy9u7/fcajfAiTtrjeNoQeW/rBGc7tkboX7avNntpDDwqddZq1FMTL3uH16dgNSvRcflXF+zu3hghrxC83+qJ2YK7x7kjMsdTOfjU0x4tXTlA9w91cBIdT4M0V6tNl1eLFn83GnsohPw+g4ysjFfoY5KrGjZgAcIaiquMvPgsBFSZreTXavdDbpTY15iJfg9dcIpAQ6qZXQhwJTtV8judTtJqGGFLR7Nw9wwYvrGHDKm/TB0jU3URmwMrGYTKAU9iuoRNMW1d0Cydln5JXMoHrqfQZw9vpRu3EZGON8NLm6bgy/ZzsDh65C7ipfWm2qHpdB0HGvx5hnjmp/0pllR7n1vFt6BGMyCF1YJv5PwjQvwj++aX8ZJZjE4zOGmanzF3RM8sEpCxivwEMkWu2AwggaGc6NutnVYMsOB6MNWK7Vn1IuA92chafNDoGeGYZ/Rvrbkbl3RJ2yEbcgoM7OpdhNKwmDsaPgfD/5ygGPt5IktaJOzKm+8hNqYb12F8MxjfdRRyBqdTGk+uyhl8+RA+miMHmGhpIad3gJX+5btZBL5WtTg7cID7jAfxoT2Xae9hXp+xg6Leb4IO2qLf2DN+b1gv2IoQ6pOU/I+J7nuyocVwzqZfSTWJiSEDIezHugnJ/tA++k1b3BuS2nCS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58486684-175b-46f2-53fb-08db7c93d47b 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:37.1651 (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: 8w0CNUGkX0dyWS5LYWSo5VYzizr0cMO1jjIY5yeLtOF8kco0eqNclCYnLLYxL7146Vha3tLXlJGV2FM/DoHIJA== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770498054528119498?= X-GMAIL-MSGID: =?utf-8?q?1770498054528119498?= 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 --- drivers/mailbox/bcm-pdc-mailbox.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c index 8c95e3ce295f..053532522669 100644 --- a/drivers/mailbox/bcm-pdc-mailbox.c +++ b/drivers/mailbox/bcm-pdc-mailbox.c @@ -1566,19 +1566,13 @@ static int pdc_probe(struct platform_device *pdev) if (err) goto cleanup_ring_pool; - pdc_regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!pdc_regs) { - err = -ENODEV; - goto cleanup_ring_pool; - } - dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa", - &pdc_regs->start, &pdc_regs->end); - - pdcs->pdc_reg_vbase = devm_ioremap_resource(&pdev->dev, pdc_regs); + pdcs->pdc_reg_vbase = devm_platform_get_and_ioremap_resource(pdev, 0, &pdc_regs); if (IS_ERR(pdcs->pdc_reg_vbase)) { err = PTR_ERR(pdcs->pdc_reg_vbase); goto cleanup_ring_pool; } + dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa", + &pdc_regs->start, &pdc_regs->end); /* create rx buffer pool after dt read to know how big buffers are */ err = pdc_rx_buf_pool_create(pdcs); From patchwork Tue Jul 4 13:37:24 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: 115793 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1233351vqx; Tue, 4 Jul 2023 06:46:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEcoXB8fviNgLhlpz1HcnzSFD6T2WX3X0UYIUnajzQ6jr8AK3MrSOPzU6IEDvD4H9palJ33 X-Received: by 2002:a17:90b:80b:b0:263:5333:56a8 with SMTP id bk11-20020a17090b080b00b00263533356a8mr8042854pjb.21.1688478369280; Tue, 04 Jul 2023 06:46:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688478369; cv=pass; d=google.com; s=arc-20160816; b=tz6yLJeeFE4CAL6Iw9vpKeKMIh4Tf+NEai62HgR/y8hwJfJGy8/1TFfTgF6Pc5khpX Go6Ht4Kl3KwfTdl8CU9/sS/wQv6aCe8JRcCdJXtBVQEst963JMSdQPN3yGq9NYrlvUY+ z2/hewKX01DIx4ZKomXJ6oPEXAn6s8gClEZFmvQHVO0sgBUydBNeR8qSg7NO9DmMdF+2 uePcd8CXb12/ksetTS5kTZhF3BiIQfNNcvX2yba7B0CL26DMkfCgahRWzbMFRztbbIwv XgqwR4lrypBppqFdUlEM7YrSzVMGMSHuJCaY7vaz/9vC+neSpjqXim2REC9696K9zsc+ TdTw== 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=DWNwGHOybxnG2KaL+sDWfXBLEdb+fyWZFnZXLh04aPQ=; fh=yi5H8jOn2nS3ES9MXWAZ4dfq12flnrqRaG8wJzLjeGY=; b=dIRyJWFIYmwOZ/D5XNMx7pQs5Zx3VEj0ONDyQ46aw7bb4e/7clw+n/JDECsDXYp4Ur SvAs8RMLTsPl1xWZMI6/wrPbPFsNfN3PTXxohjVgGfToZGjd8pXePtu5+Fx/zSdsdDLP djLKi/EIxYMKvQZYX5XLAAI+xqgCEg4rk2h7FvDx3RrHU/+bcmuDX9TCnlViOv6DsVzY t+66+J2lAkLkZL4inh01RWVLHVgCRrCwYGnNCPB8LSouMYEktdzzD/m8FD+Lw/uCYK6A OoHnPu9ji5ucq6CX2ICoGBiBuENNHzihQebFSZt3XmzZIRy65Ttwdy+UCCRRIImeArYQ f0rA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="qAcBoI/3"; 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 f25-20020a631019000000b0053fe392ca3esi19747166pgl.509.2023.07.04.06.45.55; Tue, 04 Jul 2023 06:46:09 -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="qAcBoI/3"; 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 S231488AbjGDNh7 (ORCPT + 99 others); Tue, 4 Jul 2023 09:37:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjGDNhx (ORCPT ); Tue, 4 Jul 2023 09:37:53 -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 036C810DA for ; Tue, 4 Jul 2023 06:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YugR7qg+47CKkUzT42JQXyU1w/C6D1rI1xXjfCEmlhJHGEXM4a1c4YY4ixQIIk+EnW3JQzdGScvnSYJ3V1wc4jCrEzfkQo5Ki6qIe5Vc/jgaVk6IboUh2QBVcmDPx1ulFRGIeHXbMqmk7c6U4c1DepEyRISNX7ACyJrL7iHSoo3+suyA19f0gFONKYd044gZpEX/1wU80RvUk45SHLxMP389NI93Arr06jAwWuwh2ASJ0U1M5mikd2ohIdeVuJ+VYnvhBPrvGGz+1scdEv0UAmxT8BAZRyrC2y9u5MLvVhINEOIsHNU8+9app1LEH9jlNVbyoJOpDPpkbW/u7Pmnkg== 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=DWNwGHOybxnG2KaL+sDWfXBLEdb+fyWZFnZXLh04aPQ=; b=L4eSWdTagWjAXN2ix2J5ei8w/pjEh9OgbtwX1xRAF60z7ZzsHFwqpy6kYWV74ZS9BD2TVuOY+sxYInoKaoJIq+lkTxZECzh/WeC2lIokjMrkwYr4Ir5Wf/xLHiA22fcZO7426RcmZHUB63N1ALoX2Ji9ItqYiuA8hl4ufP2WfqlB5BKR6i8KWKnKtZZxRHkpvyZWo03xiNBzoqfm8VWM24MKzplxZLsUSYDAAcQeZW5hebeTTrMp1Gys2ZKFyhMhXUHCXxwb8E8p4sUBb4ATH1lo6FBaBUp9/PrDjOwQmdFOz9FexdUMKcbFZrVjYNa75sQlA1l5oyk0HF++ywFKjA== 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=DWNwGHOybxnG2KaL+sDWfXBLEdb+fyWZFnZXLh04aPQ=; b=qAcBoI/3r9MJqCcIegmsbIlf54cYpEVPuREJn0Vnzz7ZHFNNW/klFyK/fGYbQkxwP9vPVBRBESfY1QXPngtvxmPureD0vs2LDphleMfiOUl6YVolGon9HDVpo2RyfuGKxbg/8w/d0ynklN9m682/DJzbReeXm7IbSnl1hkh4SBb+ZG7btU87dADkxZIJtr2gknVpaHonxFeOB6GNUifOGWbxCKMsi+o/F7Hm3VJjAfrBk3dvg6CXoRs8Alc8jMOn1rjf3zkKo090Nn6t7f4uJ3sH5N3PkCF45C5JtLB30LozaaVb4xhjui4l4lcX9cGoESBSP5VT8jYwS2SoUJXa5w== 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:38 +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:38 +0000 From: Yangtao Li To: Jassi Brar Cc: Yangtao Li , linux-kernel@vger.kernel.org Subject: [PATCH 3/5] mailbox: mailbox-test: Use devm_platform_get_and_ioremap_resource() Date: Tue, 4 Jul 2023 21:37:24 +0800 Message-Id: <20230704133726.28861-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230704133726.28861-1-frank.li@vivo.com> References: <20230704133726.28861-1-frank.li@vivo.com> 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: f6dd4d00-a779-4502-8cd9-08db7c93d562 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2wketFsCnOrYjCMWDDPqRI+85v5b75CSU1rcWSEKrxH712cvkTqkX6pYDpw4NrWw02eCTPzz1s5EfoIBKSeV5ZdB3Yuw0u7Oppmi1wQXCWennTSJR9XWzhARb6YdHMBnQ4ankTG6uohvom4q2poaeDpZo5bHTe5cmDwM6pO8pn1mX7LybeA3zlaVVHkVVylMDgCmEUy/pTYgYxuON6pPUuWtLcU/pvpKpoQABZ3q0w5ZFBlmw2A1BR+LE5j2NRLxkDZ379i4MOyXcldZlYVOeuuIRii+HZdAO4XMR5soOy6zoGucr6s4VHpGL5phVvYcvqiTr2fb9pIUrcGuxHuFJKs7e+LIs9XiEHzkjUIr+9cN2BGKhiZBzuU2U1Xf8FyD2c97YW21QnIiutG7rVxyc9qfE/62puJLmaIwv8IAHMwtd+ycpyZyOQfzTtpev8H5yBy9QZU7r0G9xua4VxeR/GdRXG8Yz2Jw2+9VuWpE7n0Aevi3gDwmx3/mgFng5sB1VCoZnscxqfWUwNlwqUsSqD2jrTFGqLyZS0sisFdlCI/C/XUCgBvY4quwop6DAiYFceDnzRURAXg/EV7mt59Efsi7JiEeMMDSL9C6m6388QhOeDn2HHv8Y4PHTTM0eToq 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: 49UHEbcmL7dkKjGRc4hT7kpWOywGP/AwJ8Q9T/YJ6wcUUngLQicmIXNtuqvLi9a5oLQIjfk2ltSgRPtulBE6O6jvGedkzNs8Zt0pKQkRDiGJKcjFDX1KgfTI8TwNxCzDUegM9Ji3P2U2Ev73SV/AQzv5jklFK21z7OkuLZnQEfRRD7KvWhw78zZUAnE426RsaYGNmjkL7aL+9gz8jcJhQt6ILbdE5ehF17jnxe5JROmpwgTUdezzgm1KVhcG7AB0XE/IzCzEKrlGmzmthODXCaziGvk01A8fD4FfjUHrWS6dZA8q6qGmc1umBti91DgQkuPaewhM1AswWhurDN4TPkiAeTZZSGaRL6hQWW7r0pnWvkgzqG858AXGMTLyKOz+ry5VriV6Ek3uTJee2rxh7O7BAMji3H6JQpIok+d9P+vvY2EWiorw35DMohib2kGZgaelJZfxq9Kj05DwGr4/9jDA2/XELtbegMAv8zpe5upPnSV0CoE7qnUOEGV+gOLCHjxLwvOKillketC6r9ATFEAkWHMsiYmbiqcbwLPtpHYl9rpTcUga2ER1ZUQHMzNFIqGDbI6SNIQdPvYzwfcQJUXghNZGfGgY+5NwueJ5/ONgTS/72c7RfK2lvqgghcRiy+6wrBZ9/9OSk2IsCc3jaYXSEL57Sil8n016r42JWz6Djfq28ZcMYDIn30TI7j0AK5xCOsCZRa8YFpnr5/rp7T7H6EbCdSeGXnwWNmuCrbOJmNIS5JpU66u5gmWVo8BZOgfNDh6tQfWbzysI4zfe5jKw34Hvrh36zgPIcONe1sn/EKNYdirnQWMZmlUnZz+dLCqWTvBY2fFsDnO/n+4wBSJump6mT7u4bOFR+wm/rFHnhRLw/DzpWGSGPlWHjs0O8TwHStKFmkXN0m7xDdxz78tl9aUB1P0GWBk8YzUSn0reN+f8R0EgQYLyjuztgmIwfQpN7tkU1XTkh39a7SNYfyeTuUXML7u3SLTKPTl8tKHvoptc9LZD16iZqrng89ENaTTzjOV6cpY8cBTdj8L0fiaG23Kt0PxYEfCM0CClYEPfjdshdkef1xjHqkEx97HADMl2vTrYgDcAOjVQpkla1+0yYSs3SCrrTToYzjlBqfsticihdrLOo6GaW/kncOZnfLjw1J/lRkCqaNWtGPvAG51PWNXAc4OURL4gdNq7bIN7zNNu7iiRbxA2+EoEZ+9vuLyiXEPQX2kFpq2T6eKVsv69C+NX9RLkXvwdyQsV87bkDNlAVJ4fntahVfWfeYMsp16ONA9xd4ewOD70y9ijjddURprajiQe+NfTECa86Cxp8VuqF2yi/PnOlSH2TczfcksYUV8bl+9sWomJ+xQ5X2mQisp6VshlUNXVt9+24kZ4atCZ8U9gJdXI0RFNcy8pdHYSvGcxS3zBuI+1EnIpAWQTnRqInqH3axUm9aRolvdaosUnzi5w2A5b8bzSPIHCd+bF/Su5EJoMhXR2a+3/wdV6BTWpW2OA1OTBVkF5uAwTY0Ph9K4mdmBBwih6UaaMKMiqc45CSSpgHPuhUG8qWacwuhS22ETXq4Bm06Ov5HYCVpIOGKh9P4w0UmHxtw4L X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6dd4d00-a779-4502-8cd9-08db7c93d562 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:38.6513 (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: U39WJp/wniqejM3v0OSztpRADl0rM+hn/54wmBrFfgg0hIKRjxYFZpEdlCuCc8lg22JbGgznRxPabGKKHiA8JA== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770497894039610786?= X-GMAIL-MSGID: =?utf-8?q?1770497894039610786?= 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 --- drivers/mailbox/mailbox-test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c index fc6a12a51b40..91b68cb884cd 100644 --- a/drivers/mailbox/mailbox-test.c +++ b/drivers/mailbox/mailbox-test.c @@ -367,8 +367,7 @@ static int mbox_test_probe(struct platform_device *pdev) return -ENOMEM; /* It's okay for MMIO to be NULL */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tdev->tx_mmio = devm_ioremap_resource(&pdev->dev, res); + tdev->tx_mmio = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (PTR_ERR(tdev->tx_mmio) == -EBUSY) { /* if reserved area in SRAM, try just ioremap */ size = resource_size(res); @@ -378,8 +377,7 @@ static int mbox_test_probe(struct platform_device *pdev) } /* If specified, second reg entry is Rx MMIO */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - tdev->rx_mmio = devm_ioremap_resource(&pdev->dev, res); + tdev->rx_mmio = devm_platform_get_and_ioremap_resource(pdev, 1, &res); if (PTR_ERR(tdev->rx_mmio) == -EBUSY) { size = resource_size(res); tdev->rx_mmio = devm_ioremap(&pdev->dev, res->start, size); From patchwork Tue Jul 4 13:37:25 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: 115792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1232585vqx; Tue, 4 Jul 2023 06:44:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLIv1y927LoqB9IBPG8yWGF989z9mzhrO2cZ1ZvRc47I7PVohN3dcrmAc1ngKYeYRKrrII X-Received: by 2002:a05:6a20:2584:b0:12e:5f07:7ed8 with SMTP id k4-20020a056a20258400b0012e5f077ed8mr7727242pzd.36.1688478295039; Tue, 04 Jul 2023 06:44:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688478295; cv=pass; d=google.com; s=arc-20160816; b=PBbUr5eeR5dMvpo/EpAtRy8/VXWcJkKP3yK5dZpj7Yo+jBF/DVIl1249WOJu3rZNzI g6Scl1VJEot+yZk53+0Stdk6y2a+Vda1NO3hgwlFS7C07uYs5qo3MfM3/hxuEkqfoNZU Q7gQfx5oNiLIPBdvIggK63VhVx1/6GzwIMZ5+63E4M8KWoIkJYmS6evF8n2uZklqYvfu UDnlfATJanH6VGdsoszdzmTVQ53LRvUxZksx38E65ZwLk1+NirQVV2mYg59PZ8+cf1Ef 2BIUyYhIS+XPY5FP4XXx5Nt2OgxhDOFAfyT7UPsQvQHCjKz+qFVybvHROm28ZL4QvgnA LmVA== 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=bmIAVAFKl87Y9/NyeIDknl9O71bA5hevNgqhyEW6rnk=; fh=5r1BeHa9bQQOmxdXUImB8dsC+dRYij7yg78kwGcLH6I=; b=YtzrODyCYB7LsaPoZDbf4pbYZvLYcivAYVLkUnzdGG1cNS9cTKO40ky/6jpXhzt9Eq mdJvGZypxy5ghu8neoPH4hB9zci7+04b+Z70xOE8BFwJEhWByA7Vh7tkWAQynrYAL9l4 i2KkPFyOZYbU0q63qflCMzIiPwTxDNd/7qryXLStuRoB362bkegyjwL7juQnEUAsxZus vothV2lquGbLYx055J/O1pwxpUMKw9k1M4252Upd47irU/Qpqo9gn9CJYmhtoF2OBrLL OZyycIxxFDIonv5qqQwCDpb/CxACW8trDR2CbaGTf3PEQQVQdJxiynCg2sYqtt3o7Gij aTzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SQeSKcBs; 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 n188-20020a6327c5000000b005536fc5187asi20414430pgn.47.2023.07.04.06.44.39; Tue, 04 Jul 2023 06:44:54 -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=SQeSKcBs; 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 S231578AbjGDNiC (ORCPT + 99 others); Tue, 4 Jul 2023 09:38:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231649AbjGDNhz (ORCPT ); Tue, 4 Jul 2023 09:37:55 -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 1C04610C1 for ; Tue, 4 Jul 2023 06:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Unm4uNCiDkXCiNA+H6kIac/hfUsxio6XwnwkZTqaZ1zifdLuFKTvDFtqXqqLk1F6bLSrsZwPlpa96ynToX93TB8k1PLWfcJ0FvHto8E3XieUA9N7S72mz9Y/z+9pMCQr88zWpRCaUbjsQbh4X/K5XU9IFnFQCj6PFzrvctK8lsCqjnJ81VFDHACAkW9qc7qCIe3/6mcd54YeKdepL2sCFVOspEQtWhD+R4fv0HoT+LiYFz4dKRR/bi0Uyj7jWncBP+cNHgtKStsPPg+3xC4BI/GL2/Xkb84a+n4c7d32IVGiA3gljwP7pFmuhH7dZp94a5Vr6jVEnjWzzy+vjIhM9w== 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=bmIAVAFKl87Y9/NyeIDknl9O71bA5hevNgqhyEW6rnk=; b=gJqcvicRRztwM4CldlSLybl6e9pDiUNsY4A78R5+j/Zo3oeoSiFRzKtoJqSodEn3kGru9QY36zDNQ/wUzKAlKA+udG3pPaCXjnQjDmk6hyjppBLvFxtEDHSpU/UD6Sw+UzURIZibaqe5YCRoInFRc/RnQiKOHvN23jP4+ZS0wIIT4WWgIgll2nzb3jR9rM7PwdqYoeGRSpoOG0dIeJ0D70Tf+UoROrxNIXsRJYEAO2e1MtELsbwAfmIn3mZJhugL2q1dUfdxRODnEo/O0ds7a7hHT+hryPRavVj9aq8xv2pjLJjgL7Hd+aeV4ADqAE87NJSpoxs1hvLWHO8vqW5+BQ== 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=bmIAVAFKl87Y9/NyeIDknl9O71bA5hevNgqhyEW6rnk=; b=SQeSKcBsrci8h9JBZH012FxUlYNaQ336Agblu/hWDd7JUaQQuXQXo7IxYL+GZcMQzZnBKtUsWnXE5Q6JiFwZBCldgjRmRt6kkezKFCXxcsoeZVAKsJV7aCedq5OXHk8kY5gKTAOeimCaAqc+VReFzigjiZOrwYdQ3rRdoeI1eUC59bm/zP/DHS8dtKyYyTuhfzaPsIn6LpZ1b2i2wbV1T98W41MqIRJlQAIrQA7CxGHKZ+8WWFtQUc+D5ACAhN8bHdJcCtagcs9wIJ710jyXr5SOAgm1vsic9a8N+RJp7gjPjYThc96zgQXwC3bF3ErJ0eUnOQvZRAVRqy9AqLgKnQ== 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:40 +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:40 +0000 From: Yangtao Li To: Jassi Brar , Heiko Stuebner Cc: Yangtao Li , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 4/5] mailbox: rockchip: Use devm_platform_get_and_ioremap_resource() Date: Tue, 4 Jul 2023 21:37:25 +0800 Message-Id: <20230704133726.28861-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230704133726.28861-1-frank.li@vivo.com> References: <20230704133726.28861-1-frank.li@vivo.com> 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: 9cf67fa3-bac4-44d3-f894-08db7c93d6a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xFU4cfmNojNYi7CjEFPQ7PLy90HtO1ATuIHAVUHibOq7gZd37Ab52VqL72f54Spv0eZzDSB1AH+aIJkAqChNgGzUiaTMFRMKBb0Topg9u0nY8MuNCUoFzphJW5BD28Uxuh60zMLgbn2Rb6IDu84WzHiMsUl5DWXUmvJ9otiUsF5B5bZlHCG3QmWXvmkTYdYzpB14T0FN8IzpHJcvrbrtPEifhcuDDVk+QY3PeRQzbifyCHRULCpk0Q5I7LMAZm5yeqLy4AViOqEy4ZP+WoMA9eqF9nmDI7oTaoNnnuKDD6/y21O6qiKSb8oWNXj3UBCt8jfgKC9UtQRJTKfOn6HjQUgZmLbohwn9uFB76FSHkQlYckI35YYbkjLA71jTbAptmH7mj0OSejr9btaMU7AjIYul/n4/IiTz+Y+laF0zz2y37yTXYpCEvE3vTO3gMR+CViTO5WKGkiJ8yGD+qvzLZar2ggm1AYdBs0AKf9E4oHwJrdS6LFa6SAo+0AQFGFaBtg8rPiCTTH6Qctsjs3lddZYNJa1/ffJyyc6swUJhqoTchN5xY/0CUqvrlx477PSa7cv/vEFYxheF8Yp5bkpcFiuDz9h3jn2ZdexXVIQwpY6wBW7PkPo6vscsoj4RxMKk 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)(26005)(6512007)(66476007)(1076003)(6506007)(83380400001)(2616005)(4744005)(2906002)(6486002)(38100700002)(6666004)(15650500001)(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: A8W1jHJQZ3mV0IUNn/0niU26A+C3Ar0Ak5qaWdkbVjfrq3Wmmj9Tp/+fxjHog0lVCDTQCZ99gJlMMwPBIWp/ziTXPaDHiMZLgGQTJ4yRk2Y/l7upRs+gXxl6a94yWsnJZ3swkN1/eYv31dey9aursbrvhYAJJOjvtCrKeNVkyPdhk/U00juA2fWx9o0ZweDhDvdgmw23yWkUENW+jbaVpyO8wGdhH3VNRSxhiEEPhPEhX3fbFO1a12bvFNMGNs9E7ZJhEG1TpuEXX39L7Pxk0o81AOsL27grq5TfxgzBuUaWx6u4teClcP1QCWW9S7CCRS3bPcXBIxbIxiaBtdz+Gt3hNq4ZHS/qNJjOEn+WGwFJl3zFMUJAx02O4W37ShUlN9D7fFsUokgSww47xzlHzHmGIkPga4xt1qlI3spnTWGt//XMyXYmKlWAy4NbRSfPyySVkAw8+lgfYXCrpC7H1C7mDFWHyelqZPXbwWysGnEalQ3u5KHIn3lp6YikadzZiXgt/R7r+M4mSezW0lA9nwdteDbV1QauK0V+Kkv8hHIuj9XmPFGVc6e5LgFLl9/PWBmQD4JVRz9bswni/q3bDipe54Pl0eCLNWOWXmeiQQSWAZ6csT10dgrITIhVEwbHC9ZOn+UaBACFPkF5HBZW8VuJK1mmNr3b/Y8Qw5BbAx+uZsjJAR78Mq3fJII0aZWS5ogQbcBBMY45m9IWoPqH8eGr2jaDGTIXvBkFs98XHmkonNg+5pIvzbG8Tf1biN4kAgRU4XCI6di8drfWy8Ec+ZV12vf4wyMAwVerTWmSIn/bH3njZrBvI0dPnGYqt9eE0jgZg6mIJSYuPe+4mLIqgu/XSjmc1wO/HuMbd2cSdedfaK2pk//HYpv+ZWuSNXi2Ggnju1CtjNJxZy0EwKVQchsNrI32/7321Ivh2bE36RqBisuC/31swAWS9sL6it34URhZQXjpL5a+gauglQFCSPl/xYDRifyt3HbAvJ9BljMvYnTloyaQNeXMZbYEmbUQMnlM4HO1LA7rSXaD4zZG/50anPB5DXelAiqcJPRU0cuCfMC9QslEDCn2YRwncgrWPoxYR/WeI50iHTby0NirbJYSnmfXDeqjVjtC3fIFhmXr5T+9dTeXAATvigzP6EGKsQhkrkd2nP1/59HBCVcejShtyHJ3J8bxXpUJ+OQKgNXAznCTDhow+5b99RRe7K6CTQp8dgVAhSn73Sjx1YujAq/BItW5lOZuxUHFE2HsKJA3RhGd3gO4f3UJyXHWXFmo0v1r2a24KrJqN8ZFt4Qt61yBInbQL41k9vvlRRSW+1ncTitYIrfESP14UrW872GD9OQn5VT3d5xMdisj8lPnSI/QXZ9AqMUqiE3UPw+P+OoO7WxnXPu2z08dhhL6RR8s1NpZdg0H5piSiWnlxRYgmuZlO3xFLdMNnsB5gvkHoIxGExJXIIIrIHUW8UG1/PYwsXJJxs/v06VJz9fQ65RgFhoOqk9GZofXN1a3pZZQrKvQVU5ZJ53Zo4rkSGE686MDAGcGJBjsSFMOdV8z3koRx2f65RJ9IV2AYEtyPU8ITRly4QaAABcY2rNZPe5TwsCv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9cf67fa3-bac4-44d3-f894-08db7c93d6a1 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:40.7016 (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: wEgcpBIcvv5UGx+5rNXhNXr96VxhHy5cZ7RR9/TDYkev10SMcM1aaSJoObz4ibUOVMlkEUhypHqraMJZS5axIA== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770497816516358904?= X-GMAIL-MSGID: =?utf-8?q?1770497816516358904?= 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 --- drivers/mailbox/rockchip-mailbox.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c index 116286ecc5a0..d15c490a5a46 100644 --- a/drivers/mailbox/rockchip-mailbox.c +++ b/drivers/mailbox/rockchip-mailbox.c @@ -194,11 +194,7 @@ static int rockchip_mbox_probe(struct platform_device *pdev) mb->mbox.ops = &rockchip_mbox_chan_ops; mb->mbox.txdone_irq = true; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - mb->mbox_base = devm_ioremap_resource(&pdev->dev, res); + mb->mbox_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(mb->mbox_base)) return PTR_ERR(mb->mbox_base); From patchwork Tue Jul 4 13:37:26 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: 115790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1230679vqx; Tue, 4 Jul 2023 06:41:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHu4ly9IqN3C6PS1H0Cakzxgdtgv9AZtaF5GHDjQXgNIYv4QBoVGjaO9eMrRNP9kl+Hz5jp X-Received: by 2002:a05:6a00:1a54:b0:667:85e6:4d1 with SMTP id h20-20020a056a001a5400b0066785e604d1mr15868608pfv.33.1688478084202; Tue, 04 Jul 2023 06:41:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688478084; cv=pass; d=google.com; s=arc-20160816; b=pXoS6DppvjhzMZPJA0umzSqh0hJL8XWhPbYWtCEoYDiAoLx79zms4IWSGPlyJbnyC/ bQxcgLHOEqbrmDZc7ifj5eJIgAfMZTiAHqMtUwLrVTjBWdZzrGjg4h8swuJTp1Suj7P2 TZRgcxwx75P4bMeTsfa4/Vy8oPA+5muksOAW/b+poQRnm7clNJNJsVo7rY8xbVqyxHd8 BFSfiP8ZXtmIN+UvQcCYfXZRn9bQC908Ch5cJwhUUvqpnlSXRTLRrjCOfRzGDhyJc9/J A/LGcxlGglKbve6pyPbRrqX/PrWs61bhJ/og1O046rhOH4IZKvnN1Wd6ieNmhd5W+Px8 KMFw== 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=tpItvDxAV5J93DGBK4DnagyX3yo6vM6e66EADWHI3Q8=; fh=KVIxWejU1EadQU6+Q1dj1kSHbAa9erudGljoAb8qbmA=; b=OZGpSqDHV6te8ySuoxaDiAqb5opRL+sqLlmkixLuobPl3GZkqLl+SawX+uNfREpnMw Lu3kIa7ynGOrHmcLXQ8oWujf/RHfIy3QjMokRPvJgx+GR2PzfC/rThi1QduX9AR3wEdH jkDVWtIyxhPgdsIhK3km9Idlzk0TdTPsQn6lZ3ogXD1bLopXI/HzNXCV2SmsooqjIR+Y IrWeyd5NgnJRdTvYAgcBzPyuI6B387bvpGh5fJsMCz75RZ5wCdgIzaAzO92jcXxMQ3O/ CmUWLcahtPXvr3TuCvGy/WOKULw7moDWJMChLcmRHzC4WhZQWEcsXODW3TMlBUCshk/Y PzDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Or2pTv1e; 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 f3-20020a056a00228300b0066d45f035a5si20325114pfe.320.2023.07.04.06.41.09; Tue, 04 Jul 2023 06:41:24 -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=Or2pTv1e; 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 S231674AbjGDNiP (ORCPT + 99 others); Tue, 4 Jul 2023 09:38:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231573AbjGDNh5 (ORCPT ); Tue, 4 Jul 2023 09:37:57 -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 B510910EA; Tue, 4 Jul 2023 06:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZj2Z0mVgmvbJJTWb12zyptzZ7lc4gCH9XIZ/9udFrajQ3QAmShVUDtODp4/yMqyQSWDzSLlD1i8rYu+gIpYZXHhN6FOmWzFluF1SlgOCJNxpqY7iFEE+pf27RVYXw8jUT4wkQEqJkf+6LLb4OhmWXj21actMakA/56WeRhB1vWOmG/44I7gjaaDA/3B/ymkh3S/o15lY/TICEf2vw7+hPbUn/yWoqsrtNRgTz468cI036QKiSEAJaTCUByiLvUPjNQOjj8NtbeqmdC8aZ2NhWLl2qbGjxYjqdJLeN39nIPfjILonEFhgoopjgsKRIVLG+y5acg0aNYQH0J1Gk5TVA== 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=tpItvDxAV5J93DGBK4DnagyX3yo6vM6e66EADWHI3Q8=; b=aqH54kaqyMkV7lppEJ4i3E/+RTIeWSqDVWXIPGUA7mhz979eVRgdWYL2WH0MlqkoBX09u9r1FArrHmy9ig9/3qBTBLn2Rc9zXSGxqeZj1XzJB8hnVuJw98C5eX+Z83w6ICK1JlH6nziQkO6C4Q6TeDLjpI5YQyrwADKB2g9Qyof3BmmxxXx+NLnCDxSZtO7ILj0yiheruRPdKr8RNp/ZY8d6MxQvSffOdGD0Bwoi2NrFL3WvhEFhZr7W+VuUFa/SbB4+/IOogTrOfaBoOQhQIgR77+Zu4DKEjT+31D0o/l/blUkYnE62dP8AJAyeM9khne91Jn9lDFlJpH4evl/4vw== 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=tpItvDxAV5J93DGBK4DnagyX3yo6vM6e66EADWHI3Q8=; b=Or2pTv1eAp5pyaGmtvBVo5tP+h4o4+uIKY3yNhwh6ofmIBu71a27ttIJtFriHxn3F2Eiss1C/0a6CxbuwqIAivHmQfOqPcB5T6RsWmT2PwkCUP0Vpwn3Ra+nL5KaUAlS6BJ5Zh9c+pom+19VyF/28iSpV9KbYSbuA+sjr6ZTT83WHvzf2/chbbIOlTGYzakdKBc/lFZRhiy/lamAMRUA1xPWICrinFmERAyx1eKjb4xw2qqrshrVmXUhGNC+4HzfilgFuadUoeeOpyT6CffLUreCB2jR5ES6CbeBy4klushwmrgIoKN3XGq/Z5ArWSfJtINrX700+g9+/aQEFrgagg== 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:42 +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:42 +0000 From: Yangtao Li To: Jassi Brar , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 5/5] mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource() Date: Tue, 4 Jul 2023 21:37:26 +0800 Message-Id: <20230704133726.28861-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230704133726.28861-1-frank.li@vivo.com> References: <20230704133726.28861-1-frank.li@vivo.com> 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: da155f2d-aa50-4807-1b8a-08db7c93d7b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HT3YiY4uPJwquduRPdYNl4XSRwbYyDWm3O9e1ETUGyAOiAY9G9eL2qu3JEiWHU4v5MRN5XmyDcx9xha+7GyyCl5IT64lt1Eo60U/Vnn88LtYrftV5wk/AHPW6w/grWkNFVCdQxL5zUHVw+oHd9EGGXVphv0h8IOcgOOKg+wRK+KtjzmzrQZjlXBWiBANDbQKIQWEbfNux8sta2Y0f8NlhNnCQgML3Supi/ffgnNDu2rYyzXxHLEbrF+tfsKjaLG8ulfk0ojhRSHCtQzNbTe8PJtbRzknXcrF4Ad+roFFcf+VlwNBQLmvbZDub0YZjCCOlRkSIG+xK8vhsbrryuAdbIfy3Od/3N9waDLt3ophfCGoqYB1IGdC4Mygilp7+leYSt/l5wl7J6urP+YUPk37lNgi1ZvidHuGtazI4D6XQ1rkvntdER5FLgYflF4gsqWYDEagS44n852kRJ7WRxxAkTGM72CByQ7jvLQtS7/8SLOZxWYRZ+w81NoNnEgqgKDdfIQYF87L56rQ5KhvpQWfrPctu/T+wVc4uVKoLn8SZfl84y+jj7YgmSfBWQc/RNPOt9+hyaBzbKCZY8KJLBlGVTWTJlRqSjRCot8e+ZkzMWPIboSD9xlyMjr7uRDG+5l2 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)(26005)(6512007)(66476007)(1076003)(6506007)(83380400001)(2616005)(4744005)(2906002)(6486002)(38100700002)(6666004)(15650500001)(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: Tpe/n5Jg43MgDrQnCeEwLCLCvoUF+XTAxj+EUvFwmPLSIfWi1Y5EFnHfutjuQa8gcZxsDk85mtHWUFhMbij9Y8J7Lcvb4qHPrpncwe5WQUS7iIIvNLQILdS3S1z2fHyRYaokAA5+HE1nOQqI8qCPQKCJ8oM/IqYa2AlxNGx05cGAb6NIRdWvFBJLKfUSLhtcHIfCh7vz+isIuIaKxlfPe0+eypIwvNJUybr2qzbZ2jZve8w6za/V7B6JDVOj+1Ll5hJFMKzO4O2xMLGWXdZFsnxBx7mhWkgi/0uY1qQYj2RStzKEyBgud4vKvY4LAEnpUjouNmHznsC4Y+opaG45Q/nWGz85UIZTejo+eHEhBs7opFV455ehaH/cNhFzpmuOalrgXjo9OHOY0+1LhSQN+/y3G9aX0BdjlEEY861NMmZzToQ/LCIgvLQkQ9oKStBSNkhDgpn0pw6s6TWH33KLbSG8imxAqzf69rbHMixAG2wTxOjzIUQWKfWZXSqdIzgDwrVzV6mk0ZHo/WNmla5QJwJ1Lbo49+pWKNtNowXyh8h/LU/1kXvXDOyaf27CdypLIBQeQL+RSB8qh101flus+n+QphtyD0kC7E0acns9dqGul0hISgQst1wL9bgrbENY1HfiAEH3QnqMJyeQ+zUogBlTLuQ8HFDa8JTPGrPJoGF8eDAMfMhoPloS3R9UfAh6/j2B1P6TL1LpKvrfHAa7Ira33dSXU8JHJWDdFvNLub1AkoG04mFsSkO1zJHYs+bzwxzE6rlYgL3uFy2Mn+G+SEpC2MxTHkFkLKBfPhVsRyVxPUOVm2NAh0eaQ7GyAdMiVBYr3QWYiwbe1kitRvcEwZFv18bG1JmLQFmCPljeYr8FU8lPQs7ERkot+KO4l98o5Y0ii9yxe6oSb3/oPdhsgGWCyNUjwdB/4zHok2xsTQQprN4YsnU4TnLit99KOXSTESzYx9Ys+x83CHjgoHSlinh0AKej3wZfJdSGNBNnZVbPGnU5fHg4oV4691rtzmnJLKtq877D9aVzDuvyfzVM1nJwMFukkebMc/5n2v3RGbuv3giuezg3hxZjRYWN+P2Aq3HBsx+gGg7c64DS8xkZiOIwCLMBsUbG01IUBiD4o/ADVysqDoUEIe9wJBNcKVp0jV8s4m4aHfqu18hzgpe1OSKEDcDeJoSpmQdw+pB+zjbAdoi8hVEXV1HtlwW7Fdshq/zziC0KL9+eB4cB39hU5aOQsXu6riwVS/HNJ/8/fgS9QlHYoyk+OV8oXhS+QWaV5Nv949kkpPel+mLKIyEMv6WlvZotsYgvh505QmlHMUzLZ36WGbbYWewyr4O3F5qtAwsF7j749S+JDUP6gLQzpGc4L5yLVmQsjHCyj9SpFw9djqcJKhUHZymTIE35a2dahOSVUtdd9+ykZE72AtpDZxVX6sBPbt/c3tUGE+ZV2N4WabeU0ncU7IACgu9dY9+WkFjLrWRQ584osOr/T0cH8o7q1L2SHpS/ZFReh3vsGUlXWRMweAk3FGpYohoEw64AMDroI3vRHpYemebpv9CI0PW/xawG2ASasIRc30mhLki6uyXyHQ4kHV/dGN+54Xkx X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: da155f2d-aa50-4807-1b8a-08db7c93d7b4 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:42.6088 (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: yBdlGoZ5NqUldZOoNDjrP12pM+aZhlLlU/tfQlhAuEKHQsZnzxQEWJyU9uqKJTDUNZZURMKEwehjBCSiB/hV8g== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770497595727413502?= X-GMAIL-MSGID: =?utf-8?q?1770497595727413502?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/mailbox/tegra-hsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 573481e436f5..1e82cc2661e8 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -727,7 +727,6 @@ static int tegra_hsp_request_shared_irq(struct tegra_hsp *hsp) static int tegra_hsp_probe(struct platform_device *pdev) { struct tegra_hsp *hsp; - struct resource *res; unsigned int i; u32 value; int err; @@ -741,8 +740,7 @@ static int tegra_hsp_probe(struct platform_device *pdev) INIT_LIST_HEAD(&hsp->doorbells); spin_lock_init(&hsp->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hsp->regs = devm_ioremap_resource(&pdev->dev, res); + hsp->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hsp->regs)) return PTR_ERR(hsp->regs);