From patchwork Wed Jul 12 02:44:21 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: 118787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp881352vqm; Tue, 11 Jul 2023 20:14:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlE0vkwn0FgX4dtAOJb4Rhp4Lw97ttOJkdArzOR6hFyEe6QP4TnKMO2iyByAqlGgZFMhVYOE X-Received: by 2002:a17:906:12:b0:988:99e:9798 with SMTP id 18-20020a170906001200b00988099e9798mr18840789eja.43.1689131691371; Tue, 11 Jul 2023 20:14:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689131691; cv=pass; d=google.com; s=arc-20160816; b=jEvDejsx+GYnbnOY+iQ7H66RysJRi7FXq8YDRZwWI11EOyZwSBQId7bI/KGHP4t98A BIQaRn4VfNM2ur/YztbzLqO6ExvzgO1xLwXx54KeQ2SvcR9OO5Gm7NUV8uhyA/B21abh N1sVNGafHB7lfsvjBZn+iYNpqhFPeQm2Zenc/SZdLQBlYKStQsrnJo1GupeI56zZCT8Y kRfLZ36zn3GJuJYXq9rNhrULEw1f8s/3HKO4cXXKSn+iLbemsHNio8ko+GGLuUXUAqjA OvXUcdbf7tfOUto2Dlb6T5Hb5SsK1j5j3qRLAymsdiCV3JkJzvOItUyP7b8L4dAkaW4D QHYg== 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=2KYt5yRiQVGWYlu9qqaoU1eLX3GdqPecF7OMPRSEEpg=; fh=at2h6VZ5dzftz0CpLUVhIwReF8+XuPrGxMAexUYtfL4=; b=oIYj4P6ZjY+ZhfepHBrAOkZgL6fSPp4OEpF+jf6Ae8QUakmPS1lKDsNmuNu2YThiwR s+ae+Afr8XpgEfXqIHwvng39HFO4SjtvZBpj3/Op0nXBG/H1oRr626Ph2HMT8aZyktgn ON165u0WhBEHe/RshQ9UElRXEMvXlkBaypQ5i+cs9C6bhsoOncEnaDQwjTgMSDhYoOjP 47js0n0hc2Moh1SLjqi4qWO6Ui1/n3XXCIKgbMz2ANtZ0wELC2oLBx0wNldZMc2Ch15b Aj6Kc2y8Y5nJlgxx/4JOoRMBIMaz1SVMd45jSFG6WKR1OFIZMPxwbRL1I+5q6/cWBt3g Oasw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=M7uDQSf5; 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 jz13-20020a170906bb0d00b00992d730e99dsi3485051ejb.494.2023.07.11.20.14.27; Tue, 11 Jul 2023 20:14:51 -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=M7uDQSf5; 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 S231915AbjGLCox (ORCPT + 99 others); Tue, 11 Jul 2023 22:44:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbjGLCou (ORCPT ); Tue, 11 Jul 2023 22:44:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2134.outbound.protection.outlook.com [40.107.215.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E97509B; Tue, 11 Jul 2023 19:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+OhjTLB0/HmCuWaPbZoaqHnxIdAE5d2ZdoFPIxhJCgdQnFQ1mZx6Not3ftpejcTx2CmgO1UXW8apVPcKrCapMIeJUzm5M2rtXJFZ/Vy9cgpva4JF3H+YRwR4lZS9+TghwIMTf5rSIVl+UqGKKBTllmuH7fe/o7y5SoPrDdvdbQV2trBxsX/ZcxD6sJwb0JMw2fUGIEaRYu1Q4BvChkDDDyvXcH80kluORNzSOuSRHY7KcHGQvFICl42zIuEqmz582j1Usw0penJARnjLqODeWV3+kuKyAYYWDFzcNazKvjrsm3xqHcgu1n/QjuS3cngpvtVoQMyIWYYjEVCjiKRZg== 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=2KYt5yRiQVGWYlu9qqaoU1eLX3GdqPecF7OMPRSEEpg=; b=NcgeHciTesNk9EpkSfBeoIRoTy/IOKJ+EYzIuEkSkcS8/zFpuEAwnQNBC/o3Ex2anNTAhDYvg9l5CwWwFrOWYkb/oHStwp2hVTxr6aetam1P18kZehbE976kmZrH9ZOx3VLp9Ij/ksvYU2q0hggrvIrXXcaNlfnqoC14TC6GdQywjaeehHI+ORjR2zV5AryJuNb+Qd3lu2JO3fSAReS0QFSLPhyoqWx2m03LLGNZpihzTieC0FPVr85vhAa4AlCHV8hfvY/Uij3fuaat4TnxkgRfNC3lkRdlnk9EycZc6v05ONE86oAKl9Vuncj3yFaUeE4vCznNmI7UBRsuVm9uig== 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=2KYt5yRiQVGWYlu9qqaoU1eLX3GdqPecF7OMPRSEEpg=; b=M7uDQSf5qHFbXtF3CygYZG3ZcBQZ0Rs8FkNtJ6eiuN7btf39OnM+ncY96tdr8e9XZitLa35hwx63CDBO4rCQ/RwNl/crb/oxFydLpndiWmjBPrSzrctWjH8pqpmwGk20SOF8zSOeCW9tsginByqf6BmU5scCCsb7wv8q74Xk7eMpit+pnksL7ExCafFc4TUQdkD2/sjJ63NDk8lDn0sTdRZE5mDqgjOYSzK10fcKucKRhdSoqfd61ofhjCl4hyBaT+mi0Ap7FAmn74hdiembaGqt9YgZETHUFH/Nqly3HcLxbh5+OA9Onr6NhL/VEPTERLEaG6tV364/8NdLwolngQ== 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 KL1PR0601MB4435.apcprd06.prod.outlook.com (2603:1096:820:6d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 02:44:39 +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; Wed, 12 Jul 2023 02:44:39 +0000 From: Yangtao Li To: Lizhi Hou , Brian Xu , Raj Kumar Rampelli , Vinod Koul , Michal Simek Cc: Yangtao Li , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: xilinx: xdma: Convert to devm_platform_ioremap_resource() Date: Wed, 12 Jul 2023 10:44:21 +0800 Message-Id: <20230712024421.15005-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI1PR02CA0016.apcprd02.prod.outlook.com (2603:1096:4:1f4::17) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4435:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b405eab-9b97-4074-e359-08db8281ef67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xtjAl1wcMliP1ysLw4RIYAkFsPMjrXBdZKJdVGQHsGgcIE1jUT0lAr5JkH8qhap1Avif+6rAXDrQXIKZxkxus/Tfwxf8PPpyjvYbW7ePemR6W0C/AONeNeJqfkIhfMFAmJbVf/VBa2GVc0Mb+L9UU0Q+Ncz2uoI8YuEBm4woBdv6XX1yUi3c+iGI+lx8RSpwCWMSIONBXuqRj0CRVyq5Tt4LCoTj1Hq2Vnn58S+rLOxj4YvKb2RjVpLWxiHFazPNj+kZNuK31hCHhrnxCpVfijttxid9tnNezOZmV5VdAHRTJ48MzbEcRRNQ7CpwNVgeW3EAA6VOgL/BTCzxAcZHecL842LceRjZWatcdYySbr6oz2OA5qBPSctSYDqPamwETx5Ns+MKnrYjNASkxRZ7FEHyYOQXDZaCRE5npt/V84BfuBkYoVY6jtwpcmHneuTyBEvid4r7YmJsOn1ShYBFK2BNDktjxPuqsZZ1x0HUrClPBCAxlN+D0G09tTbkE4+/wUpsKtTn0ILmIS4CY4+bvHFponPm/VITtrzhvYJFKaHV0ZtdIxLPMTeKd220wT+QOu+p9UeIMf86XDFGrNnU1SotvgD9wOetHTKL9uPX0EK2Q73epB1r78S2Q4MURP6u 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)(396003)(346002)(39860400002)(376002)(136003)(366004)(451199021)(41300700001)(8676002)(8936002)(316002)(6512007)(478600001)(110136005)(66476007)(4326008)(52116002)(66556008)(6486002)(66946007)(6506007)(6666004)(83380400001)(38100700002)(38350700002)(86362001)(36756003)(2906002)(1076003)(26005)(2616005)(5660300002)(186003)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JlC1e4AbAHBZdbqGSPQkpUk16CDXijD8aOqk9hxqNKPtKGarmeoBcJKfONFyBd6gmk2gc5I2/yxUCNvOZVqxPFMoiWPST147+7wmyqVPI//jradPHTbk/mzidAwahDSE2wZvLU56CO2nVOPZeBW+H5n6dhYCAktX40/Du6yLIFmpaZFJN9hBMNinH6utROa+d2U1tgfexlxgtF8/9h6xa5b2rlLe3GoVklVWhBMuOr/8i6McvNhleX9B+s/ZH5CM+f1RDw5mJ1yAbGjP2RA5gWwC8v3i9cLg1oKIREt1jeIpbKvpWgopYetUoPi6kiDWgeEcG0njjnXYCeWagdQsfgWg0edVfNcbS13Z0VTfeN8UsXdkbSBBqz7anHbGFS7OLGxfNHamYcJE37osxTljTuVpHWCx3052n6RZktfCh7WpcvJ521rlX1d8vjp8bSrsbK3qk0Z7XzgufxFQAb1lFmNAtgajUPOOiU/llzoyyOA81q6WFMMu0nMFKnDeq4rfUPrHhyyBoA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ginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b405eab-9b97-4074-e359-08db8281ef67 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 02:44:38.5044 (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: oTMTbOnkRot+2z5D7nAbgXf/M1KCqDo3rVKas2TtG1C/UQ3ZnUd8+diUirzdxpdE0Clo/iDf9s1t3bRnR2Kpbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4435 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, 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: INBOX X-GMAIL-THRID: 1771182952039759900 X-GMAIL-MSGID: 1771182952039759900 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- patch based on next drivers/dma/xilinx/xdma.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index ad5ff63354cf..630927dc90e8 100644 --- a/drivers/dma/xilinx/xdma.c +++ b/drivers/dma/xilinx/xdma.c @@ -885,15 +885,9 @@ static int xdma_probe(struct platform_device *pdev) xdev->irq_start = res->start; xdev->irq_num = res->end - res->start + 1; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - xdma_err(xdev, "failed to get io resource"); - goto failed; - } - - reg_base = devm_ioremap_resource(&pdev->dev, res); + reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) { - xdma_err(xdev, "ioremap failed"); + ret = PTR_ERR(reg_base); goto failed; }