From patchwork Mon Jul 10 03:23:38 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: 117578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4754519vqx; Sun, 9 Jul 2023 20:40:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFGlY/+iz2uxtVV16zUYY0rxKkwpuFgon14WvCTVUbfJp4esUukRdT2kvgGhOfBnm0lCkzh X-Received: by 2002:a05:6870:d0cc:b0:1b4:689b:209f with SMTP id k12-20020a056870d0cc00b001b4689b209fmr5456064oaa.52.1688960434926; Sun, 09 Jul 2023 20:40:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688960434; cv=pass; d=google.com; s=arc-20160816; b=X4Laft2erEdkfak72/9ptQP8EC7uWAeRmLTqw09QER2cKrneLNfzRxTJC4zkxbOvLi hd1973m3+uxkW8eeoEqya4X8OM/hyFncE3mTw332Sxo4Uk0Ilg15UNj/fI1P/YYEypOS AkT7vWtOAUSCrfGYbG/DeQhMgwCJM1IHWqsd6NLaIl8AlrfikwyVCa7P/8MMDzd91anm DYgV5ZpPV44sH2ht2USdgKDr+R/MdTmSzRf9m/tdg9DG5hAl+KrHtbGFScWg1Npil2vQ zSokxZh7hcmCZoCOfw8krZsYPgsWTRQ9Md9jGCpEwK/jztTkojZlooWQpmbrnA+fgbwG 7ikw== 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=UKJoh2hSC8dM7Y1vvcPJKJWgRJKyavcM1Y5HK94NPkE=; fh=OkhKJqwgmok9Uu1AW5HLWSzylSfBluM76Bb81dugc3E=; b=juulfItT87r3usRThWObsn8Ej1ZIjCdoGr2b/LhLpYz92OEMsmwohV4VqI7IwCskNG rm4hV9KDOut5jSDaLlQJA1XM/xBHQFwJHDk9ql5VjY796E4JjthQO0m9yAybIsluA3D6 NSrlVBxsiBT75J/L6KeMw2SUPduQCJBRwGY9q3QRQxh9ug5iMiLFJtxmojgUHVeg26Xg nUiNzSDzvuI8+L9Yh1JKQqhIRV5XTobeVtkJ3q4HeagYERx0dwDoQSQWhdqWg5EFAX1O dLyFYPj8UlHsx+NflmQxJC/cvbjbg89E9EMHHYKOOBsbdXc5yE63i+RebZ70NuCPAC4E k8Ig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YtfVcuGe; 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 dt20-20020a17090afa5400b00263dcd605a0si6382146pjb.70.2023.07.09.20.40.22; Sun, 09 Jul 2023 20:40:34 -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=YtfVcuGe; 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 S229892AbjGJDYW (ORCPT + 99 others); Sun, 9 Jul 2023 23:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbjGJDYT (ORCPT ); Sun, 9 Jul 2023 23:24:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2130.outbound.protection.outlook.com [40.107.255.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB7AEA for ; Sun, 9 Jul 2023 20:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WlLUe7npvBUqFyaqhSZW7QXqltu1drCgYg6NLKvozV8cIvkDRO5lnTYBgZSr1Y1fhN5rMFXIrj6cP5YROmuJcLMkJE5czXu9t20rgIzI+ws895Wy7vsnfcGDKs4lbBj2Oz0p1CTBCIHDth1iKlWIxWW1TG5ByNQvSa8si/orvJz35tvgmoQIQXnJ/wku//kp84v3Sa4vDsXYSN3Is4dF6hA0U7w4UHqGIH+coQV0/Wanp1un6BohcQj08pG/Ux3coB+ajYOa3HHlNF1Yu/5h9P2Tw1f2Hd8pExjyECqZha7P6rG15mLr3lyxJgXfu8BXOn1oJoELW6IiQTfMhCwIBw== 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=UKJoh2hSC8dM7Y1vvcPJKJWgRJKyavcM1Y5HK94NPkE=; b=c7lW40Q7awawgxIvgeRhKARUPKjMB0uvLKgroiEGC254hTZuFLvjkTfqlDqws4uXj5EPALKtRuKeBd0ZeFnzYr8HUSpn8KH45ATWQ0CzdAf237uM4K9d2e+mAjsJ3U0j+6F5+DBl7nj2XV17LhrkqxqnRuwubdDJrOuXSAaKuNgykDIlQzMY5k5AGPoG0ew1OLK/hlFNzQLDkLz5N2FDgQacgNANZIPlM2js9cUw0KTZF/tayojXE6xrAXVB4J1qy1k80xhth0aDYcPHp6m97FaYF4sodY+UXgAkmLawg5gHWvgEJlZRxHjb8PFhNYoToZCRGfEea+R2RKDauY/oOA== 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=UKJoh2hSC8dM7Y1vvcPJKJWgRJKyavcM1Y5HK94NPkE=; b=YtfVcuGe7Cr63yYRDaExCvO+PUn46YB+ofHBvFKmFHoXs2UwbipCDb/JKMVu3Zwk9BExRcSy2VyiuIlyJUkDfJ4+afgGbanFkqS/ZtYC0jqNsY+Sf/jHotFcz57eSgO6l8mlI7dk8BLU9q2AbjycaBJC+Lgc4Vi13aLUw6ysM+HHA6EDhINBYRKa4neWZtvBebsC1gLankgUYy8A9aqPbI+w9Esb+v1/w4AcyVG6IMx5Np0YUtQH7rpY3/FzPUeVn3xoxDHT94bHOtp/QaA/VDNBxHGGLzh6ZtVtWL1TBB/xzphmbn04jwSMcPFLPDZcTxux/TY5FdhvG1HNjg13Fw== 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 PSAPR06MB4488.apcprd06.prod.outlook.com (2603:1096:301:81::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 03:24:12 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 03:24:12 +0000 From: Yangtao Li To: Philipp Zabel , David Airlie , Daniel Vetter Cc: Yangtao Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/19] gpu: ipu-v3: pre: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 11:23:38 +0800 Message-Id: <20230710032355.72914-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710032355.72914-1-frank.li@vivo.com> References: <20230710032355.72914-1-frank.li@vivo.com> X-ClientProxiedBy: SGXP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::32) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB4488:EE_ X-MS-Office365-Filtering-Correlation-Id: 8680f954-93aa-4565-2d6e-08db80f521a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JhtGblqm6EJAvxbhPErvgeZgG6OAeBBP/PcHihRwbQiG0ckh5CEK1Ki2QN1xDqBs3Ln42u9N44HoOBOQyF3A2Ncik3eZ1Bh3xlgdefF/UWKX0IvCe9aK5o1SaJmL9byaIiYi02nVUR92lUIlCZuImvyuUBxmJVtq4yMHpf6EnGUgBtckQQAZnHAzEi8rHwwGSdXhnDf9Gd216MvlzDUV8AMhsQkoZ3n5bDDnWLWO2a+eLEXGYH3lPDAbt29yAH0GpzeF8Nr1QVdvzXT+091C0Z3Fud2+bJP08aNoo7nHeC+mrqtV0bdmuZ02sfigQe+dZ7indhaxF+kZkLUWscd4rb7VkMQPWxO9H5qpZ0SOxgnG4HaSQ47VI/R424SVcZrCltPQs2/QKDvQfu3jlXuXbCLH/Yu4GOc6o1pylkHVCqh4p9nObAfO8ZkbhRIayvYUio4l5cIT+kiNWWgnorWKVzlgzH1JYOy8YqjyH1Bki/oUrDN2qPQ18p2kM7pPVHy7ZXFpWpHwvQdyoTnJ/U19GusCj+rj5lqBkLt6NlMdT1eb7jE59vGrh64tmrbuYmLGCoZ8NY1mUl4p6qp6WrlgNIj+UvxnPLDIqkabLlWeKQeVyzLO9AEEdWqfXBnytdZ+ 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)(376002)(366004)(396003)(39850400004)(451199021)(186003)(6506007)(26005)(2616005)(6512007)(1076003)(83380400001)(4744005)(41300700001)(4326008)(2906002)(66556008)(316002)(5660300002)(8676002)(8936002)(66476007)(478600001)(66946007)(6486002)(52116002)(6666004)(110136005)(36756003)(86362001)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yeqPG/FNcWAN5mdqPS/fzY5jHjufj+WC4bcpAMS6kyKa5aLn5mBKLk1bO9vxO/U1XjzJLqK0FOUNeM0QbrettTT8e+iteMYbYD6a42bFmwMLKaPoeIccrziYeBY0VJ845ikdKqO4EKoCLjRzzNP7MDstyYbmgTSLWbdUcq/ACGQ5uCNdq5TB2YFXj3HpCCVymyilGEvCcYup/qZf888fL00OwO2lCYDQc+tfczUUhr5Rt+KqHs4qe6YQOaCxkCi3oZyngzZyd2darqgfil2MuqiQcWCEzl1qN53qqtAt0QkNZkWKsxHePXxbeMn0kdC1OsSKdF9GKtJ+U6fxRRJ4DZ7SxpH0umg9lybR47/WtXw5mCyIFqPsDNwS0XutZ9pu8UkZPLiIxwMAk+sW/fyuv2XNhyjtVcljsfW9ISsASHNIBFUIfVG1f8SppaXeEjwOETzv5BAvPpP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aL9AWTOISbRN2qKkzqbcoVRACWU/H4hIXRFvk0bCFc3G X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8680f954-93aa-4565-2d6e-08db80f521a5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 03:24:12.4946 (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: 9x4lX0+ZJWPqCb8xNLpNeLP0CnAGHiEQaKtYoI6Ju/Wu1VTysktF/BbShQ+lXbqTonwSiKZ5JrVaBN8bYL9oRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4488 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771003377235439981 X-GMAIL-MSGID: 1771003377235439981 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-pre.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-pre.c b/drivers/gpu/ipu-v3/ipu-pre.c index ad82c9e0252f..aef984a43190 100644 --- a/drivers/gpu/ipu-v3/ipu-pre.c +++ b/drivers/gpu/ipu-v3/ipu-pre.c @@ -271,15 +271,13 @@ u32 ipu_pre_get_baddr(struct ipu_pre *pre) static int ipu_pre_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct ipu_pre *pre; pre = devm_kzalloc(dev, sizeof(*pre), GFP_KERNEL); if (!pre) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pre->regs = devm_ioremap_resource(&pdev->dev, res); + pre->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pre->regs)) return PTR_ERR(pre->regs);