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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1712501vqx; Wed, 5 Jul 2023 01:23:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7zxZOAou8RxKrqQQnUgGt50SWQE2MXkA1hwcqwOvUUzqOI4k49NmGzQdS9qlL6PxIyPzwM X-Received: by 2002:ac8:584c:0:b0:400:9831:5a40 with SMTP id h12-20020ac8584c000000b0040098315a40mr20680706qth.43.1688545435727; Wed, 05 Jul 2023 01:23:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688545435; cv=pass; d=google.com; s=arc-20160816; b=CuayabAtDAF8H+vAGJGKgZ57vkMtsWsKinFYAyId+PThj0JpYOZrWUjKlAU0l1rzr3 c0nByFJDx9hPnbL7LK88qll/dUcx7GCmCcbjYikr8R1jH7ZI1Q4Iy6/93C2DRrM914dv FJEvJ49U6ZNG9M0kIRe3tzPmiKAHcmEUmQD219OPG9pAMyz4aeUkNq12vcCb1jnRB+Op iWaiuxXG/EFi0oG+IVabkfeCOEGMjeZhoTd5mirndYOAAa4td7g9l83PAhljqKTofQ6E XXMGQIGVLGmJc/A8Vi+NY7vwpsfQNejJVEvVge2BBDgoMTeFXmcDz9NzGhK0FO7Q0TmL Ho7g== 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=76HHWfAn0UPLhznGgQZoqZ4lINl84wG3zs0odGWeQTU=; fh=+dqOnbq3uD7fyoHPA3OH8HbuvEqeXRNcnonxQb66ac4=; b=bAKzeTjKKge2UaTsyN64VE7gkOucv5O7rZjqIcTjWoEdoZpxNBwwt8S/wjdtnJznHD ghtQcUzWRsaT04swOnu4qZ6ic/6E6btrqXQnk2dOZ32hjTTRULj8IgsWOmgOCUdXhH0v U7gW6qtWuyEcKC2SjbJdEoSHXLg/P3U0UEI6tsVfRsPpIChlICotgrb8gH1MXS9bNW7J aLrJZ98qwNvrqG2ZWVcL15bEGrvgXtIC8/MVl1cP+FEtIxYuPsgGgIMsl5YJrNrd+m8b QQpEmPM5iaeh5wZicavgKmsZ5VuBFGgZkUISqwNGDJB7D+uqXZdb3fKbumhDwhzsIajN p0FA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="ba7pl1/T"; 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 t13-20020a63dd0d000000b00543cc3151f9si23499889pgg.461.2023.07.05.01.23.42; Wed, 05 Jul 2023 01:23:55 -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="ba7pl1/T"; 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 S232417AbjGEIVR (ORCPT + 99 others); Wed, 5 Jul 2023 04:21:17 -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+sdHmanCzn6hWunnmkz7wzeFpFZmjXLDn/8zrlwldT2RAZnWkVOkpU8xlrb7Co+yfW97fdNsb3YonTtEXeuAzgJg4CEviynte0UgzF0IuLnB9vj4uFfO+i3j8KWYDx47xGqH5OuK03HiX5b60gOQZ3/O3CWRch4Yh/QoKEOu4zW2WHLMJxAaG9EQj8rl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BuProKrH2hcUfVxEnji3A7ACZm5fdhO09XsWDJmw88EpdvkAHyCtYSe9e3vy1TMwO8zwKmIhXELGU+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 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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?1770568219172156426?= X-GMAIL-MSGID: =?utf-8?q?1770568219172156426?= 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; }