From patchwork Wed Jul 5 08:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13301827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E20C2C001B1 for ; Wed, 5 Jul 2023 08:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232178AbjGEIVQ (ORCPT ); Wed, 5 Jul 2023 04:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232415AbjGEIU7 (ORCPT ); Wed, 5 Jul 2023 04:20:59 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2117.outbound.protection.outlook.com [40.107.117.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50209171C; Wed, 5 Jul 2023 01:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oWGNPELUWRnYFbI0Hh5Qf+GWV8rtx07ongSKhTfTozOs+inps4dNt350jon8bkhROHyP971rtTOYix/ZIc5/4X4V/yo9DazNj5HGIIXTfdjhJvbT8RCebmjW0UKAUF9F0MKKRJ96bOr0PQ+LFEJOp021+jsLU4AjRWrbXrWMb1rsTSZ5KLhfd/QTdUoxEHN9RJMODmlMn8id/t8PhK0q0uCOR8VtR8ILDzPK3Zd1IyJdLEIVeCGuCZxQbIpKVno3egIZuGYGnXCzy5CR1kUk25er+ESQ+8XngIq5Z6jVDaVvfDpRWxKfhCZLHE1lzheDmzD5c95j6k/LUo0kN6ymMQ== 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=T7Vww+uljA+7/ozUpZTG9yhuuIePwV2weGLL55fyFuI=; b=WLWAaISfieyx38+6Ks4ET4IzK48sxjNfsSQy2hp8SHjNikTEqgAkahXKihrDlJTuTSfF3uNZ9cPLPUngjdrxuqlyLMIkC+psn2e8C7iM55InbdFQMeaqsJVn++E5VeXxa1xG5e8uH/zmF7f7wueAByQbdYAHvfphmE9XFndF2T/rCu6SzTWihSu46+DcN334VEpl+Ro+r9kmgxXUP7CBOuuzQPyCYxck/Fdqpm1gV2nc/MyvXU1ietLBwNB+XxdnM4Wf2KMB0/U6DVqU68aRXOGZ1ZPvw9myEJ+xp6mnlMYihg3yP3QDYdt4jWJWijNLIglE3PPFDxZ/MKllrXNH0w== 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=T7Vww+uljA+7/ozUpZTG9yhuuIePwV2weGLL55fyFuI=; b=LnT5muO/pcB3Ho1b95IJSPg5/0pKFv++XttDEC0zm82uX1mlg7EZeldBdNVrf0xAPnAeaqKUQoVqXKNsYyTYOQlQebIsGxtkeAf1esN1Kx/+hPHcubOIxvQWx7tgRxQ7QG4uKHij2uGbSrs4uHEx1Zp6byLkhj8auYSqscP0KwpZOtqAhqlXrlhcz1VW6zIhbCCQt4izHvmWN1vPhi+sXjr1Ab+a66wWXGrDzQ7M6vkY0vJ2QIOCv3Qb3XSdxr156dbDlV+HGe4VXzDBzv3mnnx902KjhDfsE/vtUoRNI3ShpwfO5h+kc7vlCxOs8SBSBLMIBsgLc29o6doPOnJ17A== 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 SEZPR06MB5119.apcprd06.prod.outlook.com (2603:1096:101:4e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 08:19:08 +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.016; Wed, 5 Jul 2023 08:19:08 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: Yangtao Li , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 16:18:52 +0800 Message-Id: <20230705081856.13734-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2P153CA0044.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5119:EE_ X-MS-Office365-Filtering-Correlation-Id: 6814a75e-4730-4f75-fa7e-08db7d3080ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KD4XhruT3EKhq4/oyb84A6mIwc9wuTm6QAOYojnoNHWEPFMiO+m/aVm0CW4w2U/FKef6+SAYG2ABAhBan7Lzdn5IgnvdLLJozaGxC3UEuIdVWGsEZsnD/a1B6x1woBMAYxmo/+MTCusweu4CAICLA1LidXm1cJR43I+gnKkWBkNW84pRa9jPV4zS1JlEmPjSEhodsTNNLBPFOuTh1QnzxgDTP/ZjjynY/fuTTjaLY/TJTL96kCPN1CzktXFLanxNeDlOjDDoIaRElFRbYb/71GhYebvfscCNFrLrEryQxpKXUWn/ZqiGehpYtMPXzupskhyGrKIIArR72r60tl660CnJhpCPXYOZgbxVhMMCrTS2BGfFSLrlAmcuz+3zxGsYf9KCsXIneZrmROo9SfamVREL6CKYtdgC5wlJTFbMs+LubncwCsIm7lKoRavdKdX25+GbeIuFGcexrj3MeD0sI/EoCR1epb4y5Zlc3XSSG1I9poYk2LngRhg+IC2KIEGo0bLWShpU1gBQ+BDap/QNvdDgVQl5YV3Mms3BrznHuh0NUQf5M3pMY6V9Ai4ZcrjBArI1UddopGqsC5pmzWNuMvEnGaPD8bN3reOOoElVepX28tx1UnpH4RLSZCuf9vyE 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)(346002)(396003)(366004)(376002)(39860400002)(451199021)(316002)(2616005)(4326008)(4744005)(66556008)(66946007)(83380400001)(8936002)(86362001)(52116002)(1076003)(2906002)(66476007)(5660300002)(8676002)(41300700001)(36756003)(6486002)(6512007)(186003)(6506007)(478600001)(26005)(6666004)(110136005)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t6xN5XHeq3cwmmEjsfguWT61DI5lvyWlROZOZJTZrpeH3cL2gGmz1GBZ4C/9+Z6MCB7tXju20GTNWtkh3OdPjtPTjxpDyR3Of113oFb8yJ5fYwSXpgzekSstD548d+V7g+o1htkafDVV1uI7dEQ1ZVtL/VpiX4/ZCX/M+/vK5VtrXuSI1Ut1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WyhRqcBSvoNvtlfyhw1/HOa+ShvIk4FZWFE0dyGrC6giAru0r2aiWiZcZh56NSjCB9GwwEYbr44ySPdlE5QFrsu21fIn2dGhIuRf1eyilsa0wq+nDdNNkBSZi7G2kR1ZkfJugz2M6DQtxkOmyHMdAMaJwNh/oh42p/u+j4pZPJAHt715kncKki8x4ZgofCoTHrgqICxQ9VWTIhD4/pwh1t+s0ZLjUOzfnD1mBXBEWHYEn3VmEoUzHExq5PG44f8cZdFBRENubxPpoUdajkTU5rAfIdBtBYLCe4wBQFYAanRmCCdEyzroV3RHbR8+0P6njyOB+imomZJGDECwqFf X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6814a75e-4730-4f75-fa7e-08db7d3080ed X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 08:19:08.0263 (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: S3TMobqVYtLS899Y8Uo+WlcCrkVLShsdX0v9mj9c/yjFTD4spHm2RpamA5kf/BLFkj9KxNgtR8eHXO7I7rUN/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5119 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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/dma/qcom/gpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 932628b319c8..1c93864e0e4d 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -2160,8 +2160,7 @@ static int gpi_probe(struct platform_device *pdev) return -ENOMEM; gpi_dev->dev = &pdev->dev; - gpi_dev->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gpi_dev->regs = devm_ioremap_resource(gpi_dev->dev, gpi_dev->res); + gpi_dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &gpi_dev->res); if (IS_ERR(gpi_dev->regs)) return PTR_ERR(gpi_dev->regs); gpi_dev->ee_base = gpi_dev->regs; From patchwork Wed Jul 5 08:18:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13301825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D69DEB64DD for ; Wed, 5 Jul 2023 08:20:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232466AbjGEIUr (ORCPT ); Wed, 5 Jul 2023 04:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbjGEIUY (ORCPT ); Wed, 5 Jul 2023 04:20:24 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 311791FCF; Wed, 5 Jul 2023 01:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fgicCFOy68Qxtu6a0yCgJXY0+25NmuNnOmbh6o5a4+Eblkwhq1n9STCLhRILQ4jzaI68uUPqMFKIP2DsbPwbIs2g2NHTCCLhp3eHz8MG4cTDpEsE+2rTeoYyiI97jb3b5SjdfLZZF2euOCZydPS0bSwd/svNhl2BuWXQ08X5z4xpb3SUrG7kn22Qg8c7dzkRumSBjN5ILReNhBqK1x9qGE2Z1coSrJaqd5oAc7q0tmU2LATd7mzeIW3q3spTs7tH2lSrBpATWFYHzcIc4EFJspTEJYP1mwT/URmgfmgVh7E1HA5AA3JmShWBXEnsPC0YO+8mDynPXJOH9+m2/zZjpQ== 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=Li11zbLzf1YFMqKUTEIvOK09mYXdHEPAbxQ9C2YqLVs=; b=VnmO0hQiurW3SttdCpFQk1E6XE2Tq0unDH5ZiV0XO3tZ8wU3zg2kzugPzXViYbM3hIyzfSDYxRZsioAwmV8RgKEDInkg2o4TqKDaa5KgkQmsLPQ0tucUp5KW5iGSNt1ZmcD2V8YzoEn7XvUbuV/ANnLSIuqTVxCuyO/Kp6oHdtzlofmeoEN5p1MTb8rK20Zf2P+pbrv4OIO1uNcw3CR2/1qVPv4KPzy79+u9w+v+uRYmufYgb2I18dCa8bTtQKktBH3mr0JMBWHv/c9WKOMzU12/L1RoQ0XesUHWV5+cjvGECTHJpnC0BBL6vNANgz3ABLswpgjOygJqPARPzUYCCw== 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=Li11zbLzf1YFMqKUTEIvOK09mYXdHEPAbxQ9C2YqLVs=; b=BcKN6qfOoOhGBPMYeCtaRHZp9UM/RLFcmva0iK0hiIVuCJjniuAe9kNi/trD439yfIb33Bgpa11NwpYlHn8jrJ7g5s95HekK9goHrmSYjq3MxyRwMFgsgUsvkaAa9lvNYebga6OYG+/GxR74h7JG/DosCAavPWNAD+zqY2r1YREk/31UfYeCJE0VdfdUiOdCJVTeMxGxvCXo+NJqhnmb3XlUhaO5nehEjpPZleuMSsdYPimD6fb/q65jPFQma6QdrOBAM4bwMXN3+sNJ8mTo/AStKou6Zo9+Owzomr55e1sdm9mlE2b5KGIMdZvGEorockhPxnDYyHzEQFjl7yDbEQ== 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 SEZPR06MB5119.apcprd06.prod.outlook.com (2603:1096:101:4e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 08:19:10 +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.016; Wed, 5 Jul 2023 08:19:10 +0000 From: Yangtao Li To: Sinan Kaya , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] dmaengine: qcom_hidma: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 16:18:53 +0800 Message-Id: <20230705081856.13734-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705081856.13734-1-frank.li@vivo.com> References: <20230705081856.13734-1-frank.li@vivo.com> X-ClientProxiedBy: SG2P153CA0044.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5119:EE_ X-MS-Office365-Filtering-Correlation-Id: 92c66c87-f94b-4557-21d2-08db7d30828f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bgrDN9HXVdv+YQxzWlaY81zHMTqYxgE/J3GaPpOJrD9B+Q9HwZxiP/5yZ6N3kqtolJaIdmLF/RS8VrDDGXfgDpyUG8DA2zGM/ZyQgZJ0rDexuSh3Ab6x+GCeIMGPY4PqxknjfGwuv95cN0Gy12GG3z6xrBbGi3aoZoZGCE6VtENSszvXhVnkD8S3n8ThpVOgM7OC335KX5ZECJEUJM8AfNh1B51dj/4SbleqYPuRcXudvgAA+k/t6msn9j7daEcMcAqmvrFyfAqnIEnls9oCnabQREXtPbvkodGNq8vPz2oLlYhk8A+ygHGhnayGtbLcWbFU2hoYUSg1m/FXnPObmm30Vyjb5azNR9xbFsO/bWTEaQ2R3B/RmLM4Pq3F/J549280uMgBhsBa0iavqt3GmxI+FMd/UhqXpzp+sojv26aIda0tw/lxjUHFkI/Akky4Gj+ZeqYxuDKKcCdODyQi4wNk370gCXjP4ESAEwAolaABqY05WYSWHyAO9HG4aCdj8l8ducKvQ2mVa4hbhJHAaNjHZ6s4Ha6V8MGNfSogIxcF3WAXfaedKP9uRs+dlpHD/8b0kwvbrdcg1NP3/r45niiqcdHLtJwZNgVkqyBTEv9jTrpJON0gbe42/7jTqZv+ 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)(346002)(396003)(366004)(376002)(39860400002)(451199021)(316002)(2616005)(4326008)(66556008)(66946007)(83380400001)(8936002)(86362001)(52116002)(1076003)(2906002)(66476007)(5660300002)(8676002)(41300700001)(36756003)(6486002)(6512007)(186003)(6506007)(478600001)(26005)(6666004)(110136005)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Iyvc3QKZQH8DZ7YeI6Yj31OtpWHjLDACAtxOn9tSwfo5k0hFDbL3kMW5kgAev44mVlKy0MBjF6mHmH5D8AeSkl/qzki/QlbC6TB84lyOdsZDcp1YjP7t5axvdNzHMhIeyhWV9HAYi/qI6/OnA12f8LfrmT3pRBPTP0BMql5ZiyV6lwnRpGCx8v5ihW7kuAO4i+qizZqAd/omPJ2QM1ae5JmfjRFqZdZiv4rwZG2ibBlYpVi+y7jnTD/J7M65cyjo2JwQtwYe4YRbkIk6L0C6osGWeFSUm3okweE8ka36Zb5mrpdxO5zfQx2YyEl30m1P/+u1UBDTLmxZjzhcAm3ajoQ1FT2JvNDJyvonVGTRxfXSwkKrp05MVIxn/6do9BQ41jUA58YcemUFfMDw/qexy6z84BhRjk1G2Nm2vhs/r3hJEz2KDY4TUYAma7AAD7Qxh92g7L8u6lNxLl6hNMYmZnhp9egjmXT/FDzd1Ie//xYolsM2UKLZRwSghxs2ITrCLmNSfds+0L9vKkVdqoUFVHvDQ2kfFisM+G+4gk1bwkgUHY0IST5E2RMe9PvKASKST/qq+IAV6ZEN8Q19byVBOQhjqbBm6Renqr/iuJc9bCscpzDi0KwvF3/UnaXqvBcagOuamIpJD5aZBMguzpoBRucJURzBKnCC5IfkuwVyQu75niT9n6TPEBeWDRPRE0dJB8sA0ec9+4qHpa6LZ+6tD0Jnfb4NjIGbUhIklErDxbMJfd9P9I4UvJOIpeAS4bGsLfBI/DWPnG0yGPNJD3wstdJJ1wbVBOHSBr7hUdBh/vj07QX6Woj/h+4idIb6LulWqCQMtbds4078VvlY0y4+5xM+vPMPzPxhr/nZVD2eCfZEnBdVPDkPACVHHpk3weLIOAmlk6P7HqxbHfGDOqBQ0wjre7Ezc7CYIRcYUW0zoyosyKZU8Vd20a/nBTyXf0JCDX0eaophMrG8X806Q6R4hd+xKPNy0OkrbSLrzRYOgLyVSr1rKbFUTD3eTYPAhhFHC9wdFtsp1tozG/nbPYDje/mcEY7hPesgoqs497Wk1x1gj5KEqAkMBEyX1qGZ+bGMAcp1uYOEU4st4A0nj1hFICIP1fu4gSw7g4DMimA6L58S5C2SVTPdtFksNWbnU1FMJSFfEHGQILAFagsrlWbfz7IYMGi1d16GlK2cSyOo6dIsR3pfa7abuNrXnvZWtZMMOrQK5wyQ2HbPBjqFkq47Yh+bD5WhnKNDt5D+eBGk1J7LN4b85C6ggteshG0t29Mg2uHD6467Z/WY73YAUtlBitVE+wquuN9O6IJWG8NgHMY0mIZWgP9XcfNvNMrQbz3aLlH43giUUBRBX5fi9X1B+8bBh2zIbWS4AO1lRnrBLsXqh/NZG0XG/PgjbuV/sMhehvAtp9AXKYthHO2eSLUSLwTbbFQ1Kyb58h3ia1vxvfSKTIQ0YcK5G3FtL9B2a13wTuXnHXfswCxzGFlEZ8N/zibJY+kzvGKPvZ0Mx36OtfzlDBc0OBXtLDCJJ4dY/Mp7qJSdR6fbuD5iz3XyzYrJ+ph+pEQgoJMjEe3dtnTRkaahD0FuMnofY/1ZnnbKLOxL X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92c66c87-f94b-4557-21d2-08db7d30828f X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 08:19:10.6690 (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: MU2uMU7D8aLjecxTgIZI4WFRiUV6xPdmjTuo+t4uRlX6FpeSL2QFtJTyrJ1pUp1IaDLA2Z9/VfnCszY4DTWF9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5119 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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/dma/qcom/hidma.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 344525c3a32f..b5e3633e6a5e 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -765,17 +765,15 @@ static int hidma_probe(struct platform_device *pdev) pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); - trca_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); - trca = devm_ioremap_resource(&pdev->dev, trca_resource); + trca = devm_platform_get_and_ioremap_resource(pdev, 0, &trca_resource); if (IS_ERR(trca)) { - rc = -ENOMEM; + rc = PTR_ERR(trca); goto bailout; } - evca_resource = platform_get_resource(pdev, IORESOURCE_MEM, 1); - evca = devm_ioremap_resource(&pdev->dev, evca_resource); + evca = devm_platform_get_and_ioremap_resource(pdev, 1, &evca_resource); if (IS_ERR(evca)) { - rc = -ENOMEM; + rc = PTR_ERR(evca); goto bailout; } @@ -785,7 +783,7 @@ static int hidma_probe(struct platform_device *pdev) */ chirq = platform_get_irq(pdev, 0); if (chirq < 0) { - rc = -ENODEV; + rc = chirq; goto bailout; } From patchwork Wed Jul 5 08:18:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13301826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9CA0EB64DD for ; Wed, 5 Jul 2023 08:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232048AbjGEIVJ (ORCPT ); Wed, 5 Jul 2023 04:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbjGEIUp (ORCPT ); Wed, 5 Jul 2023 04:20:45 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2117.outbound.protection.outlook.com [40.107.117.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEDBD2114; Wed, 5 Jul 2023 01:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A2QQS8kp+Bjnwv/sJhPFRWkdsCCLpkBbjq9M2Z6SywmjYSMqA7P6Yl2Oh8W1yJzCycgfHroB4BF1pHP6x0NYsyIC1hpOWTiOzZ5R2QujwsUsGgwr1Xb9JnJ4rgl1OZ8hfHBD4xvSQ+R/hQAjNsRdt1a1WdD0Vm0RRMQ6Wi81usRDN8GEN8rKN090IcShG1EGc+2cv1Ahne1hMXjcOFpbumqxs7zAKjr0YU8Gb/NNybFIKlPFAALxJBabqcZvea/yxd+M7Il3G6J6PGgPe0beaSXZNTMQWAlLmd9zyQJWK0EaSQJcl7eFPXfAysSABEaR6RC10gsuZqBGXsPlFGG2vw== 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=76HHWfAn0UPLhznGgQZoqZ4lINl84wG3zs0odGWeQTU=; b=DovGn/axYzKTc+8z+QbrggETcPNpgKWmXR0Kg9gwOcObDZXrn1oSQMO2o0rkoOAqlS2PU8qTeCFpCWcyOzSlDuhg6tIpsffsMzxturZROwhz+kNbvxZiZDsNv1CxKdAcq7DSlC1fJNOet+gziO7WXc8dcYrlhpkYLSfQCQW4QrV/Is212g8QuiJwcJ9XlZd7xv2Bh1JURIHjH9Vq5gvWc0362aoRrXecZrBrlPCOmycA4I7SOMY86SJnQt+tjqKLNCBPJd665Vy8I+BCB+rbEWkLCOpCSwkOD93sgAP7hHmagwlauMcr+7degv8C1iKntqBhsCZL6NW1tEpTEf9dzA== 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=76HHWfAn0UPLhznGgQZoqZ4lINl84wG3zs0odGWeQTU=; b=ba7pl1/TMqRfYDzDAm6br9mi6NrC0iuXvglJwnOS+YVFmBg7Ebc6bOd81/25wBQanzee9LZV4mMgtpCAAO4VAZvbZlPqUqlLyeEbPUfsYZjBWNr+Zs4paCYB0RZojjb5kQa/quiFr/yUut8ksH1QT/7h+UXWMhc5wnKFJuMzJbLij9fwt890n4D6BOjztmdhTdylyPc+WdiMRHxgNe/ogijoC/ojIHN5vhAQtarDUb90xJD8TYiq8ohoqq6WWccdAhrdPHw1waaAK3XFjT4sqV+gOcVzYmo2VzzGW5Cx+fyM2KAuv4cVU5fBf81TXq1zH3ZwilKSCvnAIjBYS7T6KQ== 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 SEZPR06MB5119.apcprd06.prod.outlook.com (2603:1096:101:4e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 08:19:13 +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.016; Wed, 5 Jul 2023 08:19:13 +0000 From: Yangtao Li To: Sinan Kaya , Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 16:18:54 +0800 Message-Id: <20230705081856.13734-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705081856.13734-1-frank.li@vivo.com> References: <20230705081856.13734-1-frank.li@vivo.com> X-ClientProxiedBy: SG2P153CA0044.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5119:EE_ X-MS-Office365-Filtering-Correlation-Id: 4be2ff57-0d4b-4ba5-2848-08db7d3083eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5X94WmCg3BGPy1ti/LsCuCCQuwfMuhicnPlIVQQvOxz3wQot+Ml6oJtuO/s4DePgj6ehLQsuAFQaezALR3F283/3FFJ7ftkp223akdbDX4y6T6XFj1zISoQT9TQwnOa3OBGlXSFqENO62HSDkdhOH4w95BiKcjcXX2t+OXBY4hekS7w2AMu4IL4X/Pw7TD6TMFU9HfB/fYGd3JQSo6Uu8Do+cADpLFlzhTSKuPdEmqyBDHoOVue//Ksj0wr8Gve0iGByj0F0tiqgrhcJ52+Q77QJvhh8ygwdjWMTa6iUUxAUH4OPbKCb0TRDSU1P9DPbpuQR1ci/607i+OMcN37lIUy6JalA+M8/xOM69UtUn1+tk/MZ1308VQBfS92TLnsnw9cWO3pyIzWGEUUHp1aWTGOTP4L9J0y1n8eOAKk78vZV8E8zo8nuEY9tUvDJapOaMOQF8YbVMiAUObNA+AGQ3WI5hZOCwi/WG28cGbzQO+XryqGwjNN6uqPLKofMwm9YFUCI0kDV5Hvf1sZdpLLiRHaeaaonI8CaTlM8ACgBaI3vW1xZGuMt6nCam9b7ZZrA3QvfkpJXjNA4fTsc9M3oE345f39NKsoqO58IYyBzHa5Mhdvgp/llw8joIq8Mi1/R 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)(346002)(396003)(366004)(376002)(39860400002)(451199021)(316002)(2616005)(4326008)(4744005)(66556008)(66946007)(83380400001)(8936002)(86362001)(52116002)(1076003)(2906002)(66476007)(5660300002)(8676002)(41300700001)(36756003)(6486002)(6512007)(186003)(6506007)(478600001)(26005)(6666004)(110136005)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y5lyQ0VF2AUPUh1vpWI5GTPhfEbb4RMhoPXOlL4EFqHNWDwBPwGLXo+EMiBtCYHvae/L6J+KDBLQDTFPz/e1kMa0CD28bWvvZW6OK6l4/KQnW78C9afSNk/V2KA6f0uAOstkvdpFJsHJ+kB4ksF76olozLEf0xFT2dpMuCpkOmpYQ1EUKDdSncjywhVU/VAkUNXzkS1VLWY+sdHmanCzn6hWunnmkz7wzeFpFZmjXL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d0kzN5oJFE1ZzCNy3YcSmFPCsFo7BMBVCMMn3kUsVKE2Xsw9OpGd4xYDYLeZViaMs5c0bovIM1SyVD6KrORGPAhupuIXBetFhGnbgzcJer2rsITpxUMuK8XoerkYSltZodcAD3PYfMHf2kYhegmcEPcFm3f5PXBuProKrH2hcUfVxEnji3A7ACZm5fdhO09XsWDJmw88EpdvkAHyCtYSe9e3vy1TMwO8zwKmIhXELGU+SB2nEkiY5fJMI/IIV9gBCYHyudlRLpj3KCojAiJheu0ohHpRN/ZEpETr5y2Quy X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4be2ff57-0d4b-4ba5-2848-08db7d3083eb X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 08:19:13.0315 (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: x9nk/Po4A01JL0TDxD5aIKBxxFVGyYTSCWEft4PYIP8RGC/dHS+ykGAVcbsApx27UteP006LLn+vz2NOIeM69w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5119 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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/dma/qcom/hidma_mgmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c index 05e96b31d871..1d675f31252b 100644 --- a/drivers/dma/qcom/hidma_mgmt.c +++ b/drivers/dma/qcom/hidma_mgmt.c @@ -176,10 +176,9 @@ static int hidma_mgmt_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - virtaddr = devm_ioremap_resource(&pdev->dev, res); + virtaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(virtaddr)) { - rc = -ENOMEM; + rc = PTR_ERR(virtaddr); goto out; }