From patchwork Fri Jul 7 07:20:20 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: 117032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3097440vqx; Fri, 7 Jul 2023 01:02:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHv03Z2Z922tniB2R4E2y+jPYfiOwE04T/fCBkmsn+bOP3PwfTm83/xiRGlypNt81ScGAAw X-Received: by 2002:a05:6a20:918e:b0:106:9266:4448 with SMTP id v14-20020a056a20918e00b0010692664448mr7330153pzd.16.1688716966404; Fri, 07 Jul 2023 01:02:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688716966; cv=pass; d=google.com; s=arc-20160816; b=IHukmTO3CT3jDmaaIb+TgfGBVcAQNTDH3tmnm5tCfEbppZZRyoWartsmfJ3qAQk3sn MZ+cuWjj4y1lvYz+W2hKrav8GtSl/GkXcWuqBmzY7g31OJRvAMddaG9FNYYBgD2Pt2WE 9v8TmX/qYwRJwIB78Wjw5MGsqfqcHCt6o6VILXZptf0bPFhDXsVuukV6SEI69INgbLUj guvykszyr4dPpILPKkqJTRFgAgxIf+iFaAzKPVgur9N99ii80IRYqQh2bWsm+e43yjsM hOcXtWibvF8Xmv6iyvCnt2jMX0e+94wwyNzJXyCfWITMtO3aUKWUtqt/1QvrWB/iePWz AIyg== 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=i+zqlnB9VISi9AH5ikBu8sH4SK22b45CMMph0c8wbYE=; fh=MV5E4wowCazqbcJaVtidHWlRfk4k3yRrOp8IlnZMeZA=; b=U53GrK4HMU+yOG1VO8I97Llchu0XxnMMDOHpjf7xqjrcdT7zmYy6wby72QFFswyUUZ vcYncNQhkEla0rUL858WPj8eYnnnSxM1MMcBfd2w/5jiR81nGJO68t8CR+e9+2SshrGN /XBFqgUkT1za6O+oul41Y7r9/oX3IO9+NbnxywDDSVmYbImS2mAkftw1OEioWaahuUSj RSj6wt/hoWxFPb1LszTDjaz8OPwzD3DNV2aQZgx/0Dd5jQX7XkoDfJXaB8cWpb4Rt8yf T+h9t7VeB/iNCh+s999P2RgWDN4DidodYW5MJm3mEXHjrfd0VcxsH+2rBFPr5z7Bj+T+ 6T1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jJ0xcsTP; 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 g19-20020a056a001a1300b0068267c56811si3374690pfv.167.2023.07.07.01.02.33; Fri, 07 Jul 2023 01:02:46 -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=jJ0xcsTP; 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 S232149AbjGGHVD (ORCPT + 99 others); Fri, 7 Jul 2023 03:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbjGGHU5 (ORCPT ); Fri, 7 Jul 2023 03:20:57 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2102.outbound.protection.outlook.com [40.107.215.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E0931FCE for ; Fri, 7 Jul 2023 00:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eE8xD52xfNRjYdK5WpetTWxY/90jw7nqA55pxALtLtji1WdKPp9u/dF/F+iSpAmAe1qQTKwHm/YkBRfZaUcBS5FnhwWePvoc/u4EHXm1RBmgrEcsJf+XtJaERrgRGSe/Y3AbsTO/yNd0qkejps+7OqxZtHnsIw2JF1VzSg7RBWH2XDimlXwGu9dXC4n929M0GeIp1o6U9D8nW7J44q8NJHgg2zTN4ua7XO4nM2srZ31CQUEUAsrb4W4iULo49UVlGXe5X5TM2shHSJFXRX689EBI7pti4ycRVprRuN+M/eD8gh4YMwGvVwRrt1mDDqJGIHz6Y63zCwDP+LtYr+7OhA== 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=i+zqlnB9VISi9AH5ikBu8sH4SK22b45CMMph0c8wbYE=; b=iM6lFHbVt98QNKTjZkXqJ2SyIg0DNxHFuMSa/b3Bsx8nHt3VNpNVuFOOU2FVYLaGtR+hqqlw013W6jJClp6w1K06U9IEgpJyGumvxDqJvu94Jsja+J8yMvTl4srFFZK+zIl8MkUmRqeo9K/4fBFZYpjp+T1rPkRs36l4O8zG1IfHeY+Ckt70W9sDxAnhe8qLkP/leiYV+BjQK8Lj1TqqsiNLmWAA9QCiFDo0JB6AphSdPbXL/E0kCuPgCSQ5av1U7csX87MDoS3yEBzp8thhhWx3j3qyRimxrkm0HzyYMrrCnhY3pHsEL+W5tEitc9jQM6+7u1AAndcQenvt49JzRw== 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=i+zqlnB9VISi9AH5ikBu8sH4SK22b45CMMph0c8wbYE=; b=jJ0xcsTPuyAl2+4C8vH6CI/i0Wxa8l3gua4OmrfdgJMd4Vknqi8MzJBrAJpy4uB7vtiTHSC6cWeRPnsoJ+3nD6XTCc1VHSRHOTmfcekzMuBpm4EWHi9zU4gWuP2nn7swUrS5qF/wIjkRmxisvO8s9QU7/QHRvI3i5ft3eq2A48aN+laUMacLwqSzefQSI1VStIBJ2Ne++uWx7ioooFjDgewR8p+14kh6kQkWzKmQF9ZC5wMeapZehxHV2bWHu6aCvhusNgXQtpjDnGHDa7g8HtBYJmaF/3RBms899p9se2U6+dQdbS3ltPgt6P4yin8lIeJ9asXCdVlji0PwhPjZbA== 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 JH0PR06MB6704.apcprd06.prod.outlook.com (2603:1096:990:37::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Fri, 7 Jul 2023 07:20:52 +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.025; Fri, 7 Jul 2023 07:20:52 +0000 From: Yangtao Li To: Xinliang Liu , Tian Tao , Xinwei Kong , Sumit Semwal , Yongqin Liu , John Stultz , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/18] drm: kirin: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:20 +0800 Message-Id: <20230707072034.48977-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230707072034.48977-1-frank.li@vivo.com> References: <20230707072034.48977-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|JH0PR06MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 74167744-7743-4ab0-8b89-08db7ebab1f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rrXY8AJD+E3MGRDiXExRLRQRl/z6KnwxNoM2J+Ks+GRoemGREsaGOZTE+b5QcS9TS080LlCgFpkn4do+UFIxOi/M9iVccvLblY8Kwxfxen+/v8Nu1DSzq2bKXdFTxHklVa4lvySZm3IwRKwx7TELDO2pVC2R20pY1w0MCtCQVDFgZS9OWpJF4RVH0gErnK0yYDtOnLiBtGwsSRDgXvqzmjelddlJi/2a55KKDazu9eS/axbuyrPayAkDXCxcbDblQiGh5QoWNhWxzQGKVHdGZ4tct4v7Lyizdy1hbAnA+VELIisf1FqicAoxEwglpBQb6GnruYYUjdey0EtMbJ1OMBoFKOMHavoAp0a76JDILyKj9OJ9YChj5TvCJd5xSgD1dlERpBVqIHQsSEF+4PK0Dv3jKTn/fDLqu+1rHFEy6Q72Mf3SSWtwHMRUYHrjRPTv/BFmhRZRQNLlfWgW7ygwzn2x0ZyPzdsBiqmrspyu3RDFGxZkOUOGiBvE/IiHThrvPnH3RYURlQbdLnorz6KBtQR0LLbpitBEv8/16wQEVSulxnhkm73FPEmsMcv4U/gPZ7fKYMglwC/cEDQ1MQ8rw+G4LYLsCpAid7CsHKz+ZNvWoOWsenTw1msqdwr6xwhw 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)(136003)(396003)(366004)(39860400002)(346002)(376002)(451199021)(7416002)(8936002)(8676002)(41300700001)(2906002)(316002)(478600001)(6666004)(110136005)(6512007)(52116002)(6486002)(66946007)(66556008)(4326008)(66476007)(38350700002)(38100700002)(5660300002)(2616005)(83380400001)(186003)(86362001)(36756003)(6506007)(1076003)(26005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: M9HFsEbksU5XXYSXRqW7EDoIJ5IL2xMNzAj5alnpNXJnYNkmE3Oblgm35kasDMAVlBWKtbW/VK5Ut2LssOb4A+DZzFI9wqq6VJ2JgVDyausih/hJgtICW5BhnizZuvpST0hzOfsamarhSZZkPOH04SbEBSi4XaGIbekCYxOuu+cKn4IRXTMsE74FPSypnTNPs5JqKdml+Uyxcob42zOW7z8dNLoeVUAty2P85DHR3M94hlsDyCu+WZRcjoAif2DDTaB49sqGQ4BgNe0EixCKF8Ixu+vJkXF8qJlK+yTDO/3CSP77oyJD4biAu41B6lbx7ruVYaDclLDSIWIqs70AzfDV08Fnh8CALo3pCiVvnoQvDKTnh2q1z0TTkidGdKAd2DRSX8bECZ7Z/Fml6ZlufuH++FAnQ1v1Z1HMtCrCi7EWZBoFDYVvDwJ7ZgUjMJK8DXb6022Q+h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Nbd4pWlZD3W1X38MzmDTeWSViehIuwI7LpUrIPvc2sAjHGv1Bz1LvdDCIR/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74167744-7743-4ab0-8b89-08db7ebab1f5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 07:20:51.9936 (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: ZR4xzNm5bPZnLBfgSCdvPCvMgZOJF1pb2nYL7xghNYYHbDUTEY7sHbfUSjDUxpoHp9U0ZegIGhX7anHgNdme0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6704 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770748081724997849?= X-GMAIL-MSGID: =?utf-8?q?1770748081724997849?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 871f79a6b17e..42ae68c70880 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -843,7 +843,6 @@ static struct drm_plane_funcs ade_plane_funcs = { static void *ade_hw_ctx_alloc(struct platform_device *pdev, struct drm_crtc *crtc) { - struct resource *res; struct device *dev = &pdev->dev; struct device_node *np = pdev->dev.of_node; struct ade_hw_ctx *ctx = NULL; @@ -855,8 +854,7 @@ static void *ade_hw_ctx_alloc(struct platform_device *pdev, return ERR_PTR(-ENOMEM); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) { DRM_ERROR("failed to remap ade io base\n"); return ERR_PTR(-EIO);