From patchwork Fri Jul 7 07:20: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: 117014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3083799vqx; Fri, 7 Jul 2023 00:27:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHMVwJ/djOOl65XIMdbtt3KgNdeMpnn3RcPN7g0F0SBAEfA/3D9ac3FqZiJtLqiSYs31jLd X-Received: by 2002:a05:6830:1683:b0:6b9:107b:5978 with SMTP id k3-20020a056830168300b006b9107b5978mr1543689otr.27.1688714864878; Fri, 07 Jul 2023 00:27:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688714864; cv=pass; d=google.com; s=arc-20160816; b=ZAhXbRUCG71XHomUtPk95idZSb+13h2RBqF+BY9VN2gSG8y8L2kAK60CpV8f41quaW htlJYWjvagjgIAGL1WlPwL+r2fA7uZLpEckUVAPG+jbkwc7DXGU8drMbZplnX3jq6ekB 363z6GtNZwkP3da3kedKr1NwdfRuRDeVSFPSzGcgYuONJnwL6k2kW9dlE8BioPCak0G3 LJ+tJyplPpqXT803wJq6/ZJZU3tL/9/6a31LQqZxetEY1m/6qdeh3Nximheta/9tvRVz ENs5GXpMc6NOVdG2In8j5mLdlphGYGtE8vooOVw5SSpEaTyUaBcEW2BLaMlAk34ekpse /kGg== 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=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; fh=T066uiqTjxYahUH956oepKMkel8Bcf1VtzASGxEcXvM=; b=NNNGaxOSwJDe1mI6eo3GCgvTD+T8AtqTBqLrN+lgFciPFzGZETJHs0d3XJy+nYiCrc Nk8rpqO35hqcAqKpkurIyLhRwBS6L1eMUz/OlYrlcDQfQbFL4I1UGj2SsVYH9hY/Yx0r yqT0zggjXGvQI4/f50DRQJ6o5pyJUF8Xa9rJ2fV1101Q7TJxVSgu094kILd5x77eXa2x CHTinodVbh7gmM0FYEksxnHHi3jDKL4WSWKKw6jtMepVH0qL1Mp/nkgZL3ogKVG2r+Dp tTypf12Ry5CLIlvOSAAsYzakQAlm7GWipu6wuHwCvAnWW72Sio4tm2dAgdwCUaFzP58X Lk6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aetJhNHr; 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 j6-20020a632306000000b005486a1e9440si3157119pgj.780.2023.07.07.00.27.29; Fri, 07 Jul 2023 00:27:44 -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=aetJhNHr; 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 S232507AbjGGHXR (ORCPT + 99 others); Fri, 7 Jul 2023 03:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232438AbjGGHXG (ORCPT ); Fri, 7 Jul 2023 03:23:06 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2071f.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::71f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A352A210A for ; Fri, 7 Jul 2023 00:22:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADTRpBSOn9KJO4VW4l1ZxiV5nNbYFq+cYnvxbSYhhcXci/e0LZGScvrabPOZYj/ufH0gGYSWM6uk4Hn/jaBMCc4dt5ZTb7UoT3Zum1oyraFQV019eq7gyzChbPLNUTJLOmbNPGDUw8Q1xlZq4hDX/G3sJQi/KzK2076oVFswrq6lXV6oRhJQhZm3OY22dzfV0xvJIc0UHWrg4dFBy6NDbiay9bCMytbsCPm0VDx9DUU3F2KpEq4EFIMN4FPR80WXsqJZn7TKD8VHMU79KP0QLLdUNcVpnaAGPYuNXGo0q9fAH8iwE0ev5ZZQ4H9QgCnIQSMbiBeDaVvVdejuAEKKvw== 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=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; b=CANvE+MxPBkb7IfYZpYPRuiNStwGrj3Dnk3z2NlBP6cxrxPGxMZs2YNuzNUrJsOxbuJF8fxSz/s11IPMmTZ6HAXUMk4Q/1yLAyNw3/hSbMjlHZoZbmWWPDImsxxd3jt8j7yhKXKqWl1cTLkes7DTGNqh2K1Ynya8Sj+k1W4ydhEHgyFyenkK6QihV05EQYmhOj+ocvtzSMV7ZPnbEgDJLwDa59UaQgtlzjvuxZqw6SMskFJ/UkgGu9uBEsSjZI6KoAOvQWMDIPAt9buivgVluEk5J3v66c7/nSK4LnLKtITBCrs58sh4SKn0fKk/gJuvw0hX1IUYjB4FGBTyaAtSrQ== 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=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; b=aetJhNHrAj6oNnTZvjfksIwG4JllOoswEKqtNxK8SCIye79eWhAtf4gkOYJuavbGJC7+ljxEgbZcesPmlDe9Ndd1uj9+uEyfQTykGpnUANWPnh4QvhUoy/Y3uQmbPd0TTTYhITKGY+uBCXa6LklXD6BChw7uxZFE0qYWLs1eo1UMFDvxzm3NLnn5DDxnW4wqIVcUxRpK514pNarygbFH+zU+rbjLzDQxbxxT7TZOgWTaOLUpDwHw3gof+x258p23G0k3qsAjPGN0GieKtIkPpqB+fCdv2IG7lGziCYTfNJDrYkkNMbanZg17e+RkyS9U4FCE441HIoPmL+w9ro3Zuw== 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 KL1PR0601MB3954.apcprd06.prod.outlook.com (2603:1096:820:2d::9) 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:21:28 +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:21:28 +0000 From: Yangtao Li To: Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery Cc: Yangtao Li , linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/18] drm/aspeed: Convert to devm_platform_ioremap_resource() Date: Fri, 7 Jul 2023 15:20:30 +0800 Message-Id: <20230707072034.48977-14-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_|KL1PR0601MB3954:EE_ X-MS-Office365-Filtering-Correlation-Id: 98ca81fb-a898-437a-03f6-08db7ebac7c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K8+2pVw7WfpvGyWWuyHxRS1412QtRc8T90OjMwUBRx6lflp6gQpSC2JBaGm9XTFMKRPz6A0tJQjj9M147KXV7IOxhnLEHurOOCkmzNQ7T2Rnca7rzIcim+L32vzIkEmwbBQr0ZK9GbZRIdw1hrdoG+2EMOopfsjoONOOIEyY9ofXS4H4rZK1b/XVL8tay2XXG0Trf2Xrn5HJfzmEFTsQmW563Y2sJTZ9DlwC01bD8VMR/d3PUm6ykOpNdySSqoaQVGnQOWnuJjYa0cHtXZIWMJ8P40onGfZRb/a0h1s3XaiHWFbepe38GW06tOKFfj6jpy6vWLfZoYOvzDfdA/Nm2a1xCyv3XEz+X00AdMmZO2HvbZiXMXG8mjn+gBxz4Fm5ANnTQVx8tgoJcQKUwOb5ch3iDunmsP/OXvyJDQHK/vzs5JDsDbNaU2L0bwzCgmRotsomRYUuDeHvQCxog+UHlDnptHfqwG5fr+hCcjDXGcFHttle0qX9TL58WitsT0Cv4uw8jog69FdGX2b7f7fDsGxxkl+gZ9aJBrPHvtXF5L/COaJc6GnvCzo/CcM8BpsQoYqMtUcZnJ2MYYs8po5gz3wwwKdXkWnz6w1297SCAQtUd9934BcOOwBGaaSdnQkf 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)(366004)(39860400002)(396003)(346002)(376002)(136003)(451199021)(4326008)(478600001)(316002)(38100700002)(38350700002)(36756003)(83380400001)(110136005)(66946007)(66476007)(66556008)(2616005)(6666004)(8676002)(8936002)(6506007)(186003)(86362001)(4744005)(26005)(1076003)(5660300002)(6486002)(52116002)(2906002)(41300700001)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RLzLwAI15JN1wKnm0/TtuMG7iYMBBAeolgJYrTJqudVv3B4PRiiKi9alfb5VX+6MXNukRBORTXxRcVFWywvYpTnxzkQ94YnzitUkcUnz/MpfsQw4AlZMq5GEEnuTtBTQeNVzc1qcF3n50zx/Vl6kefzY1SttA9zzMo0L3UqteUHMtD1wD3FdEci9oQw01XSuOrOcvug/a5cTL15TlBSLjCdXpJ1yb4RDHoFUNbUMQeSfDyxGNyGphXH/mGbgr1cUrUut/CYkauiA9v2KQUTbxkzjxdaI0z72UbRNFI4W9GutfzCwiu2p+Q64ZCc8qwSwmDS1zuULpB+Pvm1wBYjz5U/vdairN2AiBn9Kz/5K5YpK/Uvn7isNYg3PxVPq5B6FkOpl4a2/pE2lryoJt75S88TpYqb4qiiMrhgIvf77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uu2tZcITB9dN46hutCcWHGfnB7T+IhCxvMhVitVJX9rgBknYqGqgI6T2CY1nGRhsoweh5+W3xIMaBYmL8G9I7Q0fC X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98ca81fb-a898-437a-03f6-08db7ebac7c9 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:21:28.6081 (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: aMTiNHQ6mwg+E62Dg2vWV63sFjJQFsrO/attVtfm7WQeSX4l2Hsh0ZN9771eVOUX/Ivg2xYUdqchdWpBm9oe6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB3954 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1770745878187152538?= X-GMAIL-MSGID: =?utf-8?q?1770745878187152538?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index c8c7f8215155..d681248f098c 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -144,11 +144,9 @@ static int aspeed_gfx_load(struct drm_device *drm) struct device_node *np = pdev->dev.of_node; const struct aspeed_gfx_config *config; const struct of_device_id *match; - struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(drm->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);