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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1718087vqx; Wed, 5 Jul 2023 01:38:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6c3wx75KIErmYmiiPi/xg6ZM76q4LU8dwAYNrZMjudmhMc38/xViXLe49pRxdjyTkNdLc X-Received: by 2002:a17:902:da92:b0:1b6:c229:c350 with SMTP id j18-20020a170902da9200b001b6c229c350mr19809430plx.18.1688546313839; Wed, 05 Jul 2023 01:38:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688546313; cv=pass; d=google.com; s=arc-20160816; b=pGBYNs0ugVEJHScWtIADFOcJJjADeEFgjZsoxvtyX25u/oWwuntnE4kmRmUueqlaqn iFtp3IV2P6LRszmYQNITZ5IXLRLTl5YpD64eUmp8Ka6TYsdBaPszJMaYbJv7S42FaGWq eY3dzCQWC+uaWaE0oSCpphA5bDM8FC7NXt0MdI8gp+bNv6OWIZNGJFGpCTKjrppP8m+C sC3bmaybQkrrWgv8Wg/DD6UnidHd8mxbuZoRPFbXCgXq8z3vbVT1OUPmf8MyS9R4cYYk IdQPPTTV/NfkefHHrn7D9Y9HNhh+pnh4l2c3nWIvgHLo8ar6E3qctRabLHg17B/goAaU IV+w== 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=T7Vww+uljA+7/ozUpZTG9yhuuIePwV2weGLL55fyFuI=; fh=0I6ED57fuw6YJWxGgs7h4+J1y7+QO/dsHVMEK+um3eU=; b=c+ZKmX3q+R7JEjB2IjRE5ZGzfB7KaNhH+035ufYc6/Zk2RKJM85h6yqLnWvlDFb3s5 vfhebXxLx4PvIpV9CGTPIJVqd5KeHSrirQZ7Y1pZIgwWAL5ThDPa4yetaWc8SbP0DaVV HKXQ5eOdHKGnxr2oS/ivl1CnblkaWDqNBvrVpVXQ04AKlGbdiW+7moNrkHS9FXyqJewv KSDw8BkTwzEs6x3nmjdpYC2PIx+0UaEJK65Iy4MDTWEz+8dtHzRWr3+69KRE4Fw963gm sJxFyXQQ+SU+UeLLWryGy//xxhzyql2ckUgu9/KsuZ/35t36g8fGBm1ub0W2z7tiZA4A vRvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="LnT5muO/"; 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 b15-20020a170902d88f00b001b01276a0bcsi21745497plz.51.2023.07.05.01.38.19; Wed, 05 Jul 2023 01:38:33 -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="LnT5muO/"; 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 S231851AbjGEIVZ (ORCPT + 99 others); Wed, 5 Jul 2023 04:21:25 -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+/vK5VtrXuSI1Ut1XX0wWMEGN+IsMn+cMfiay03nmeKP+VdfWnBQp1HedAeROqiabgODl8+Uyh2BsHtFU+d8Y5JAkd6u2jPN+iC0QbE0/Q4w8VSriAhHVe7UQd5sAsNUd5+VgQLcC6kUSfkeVbfhiwatWc+TCP5DaQDRB0KhM/zTWOyipoChx6Syd130Xb8XEuf4O5ijMPx24olHPkZOreZ6cRo83xr+oMAqaIDmBNA3gKoVvA/w44SzEGicmpMN62nh2qsaUWhqGYAUDAIzpjKEkuYPeZ4rRTGjVAbJ2zAhhQeE9yUxyWH6DIZbILR67b1ZonXMoiQj5ctlWioJpuCS9s2L0kXds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ginatorOrg: 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 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?1770569139617575139?= X-GMAIL-MSGID: =?utf-8?q?1770569139617575139?= 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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 116015 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1712380vqx; Wed, 5 Jul 2023 01:23:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFD/5uAOR3cIQp5NXcP1UuNT0ShVug86cZ6rY9JZmGoZkZYSpatxk7VlJ5C+eLKlpPRCXEK X-Received: by 2002:a17:90a:d202:b0:262:ea3e:e248 with SMTP id o2-20020a17090ad20200b00262ea3ee248mr2320350pju.7.1688545414221; Wed, 05 Jul 2023 01:23:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688545414; cv=pass; d=google.com; s=arc-20160816; b=YK9/zQNwhTZ/RBbPnxrvj8cRYT1p11OP1Szvxj7hyScvX74jx/W37ofCpkpZuxrs/K AbOfBEPi3oD0jYPRRGWueXo+9NHVYOFFfCp5BHdIlNiF2Ajc7LybDmY3wu6mB/nD8DDB vinO39/54wHtgOxAXJTmFaMxk30Z3lDU20moYMuu78y4zP+SrWVwdGXhd6NFFhrO4x1o 5785ufZZ6NcdIDdM3k4SSpWK4yvVSqr/mCVJtIkY/IoyOdJZzjXRBD473ssI3fwtQsiD SA8jAmS8Ap4nAcOhF5a9fQrj9/86BoWzXalKI7or3sd6Bkj3uKib8mkqP9S3H6jxpPM1 awew== 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=Li11zbLzf1YFMqKUTEIvOK09mYXdHEPAbxQ9C2YqLVs=; fh=pM0zTUSrezqEZP4hbWsCG7jLP5cHbkQfXWnp7t9a/2k=; b=LywilGktvJQcn2wptccGXz7KDqu7r0w7BUL6/j8vLR5YABB4lH/Q9xySztrqBqCBCl jQ3rIpvSJskhyFca7hg4+0MC3MahGp9FRhyXNEtSxeAYiyaYYVrgAs7tvos6pAlbWWyW SaXmQXyRX7Xr2Lc/nGjpyRd8vsSGOr2BBCVE8kwQ9zYV//xy5/qQ1MYnG8ccdwjQpWLm Dw+VCFu9UiU1sxkEA3fPT/GTzHfHwG0ubQRXVMmWHLaGdsAOi3jGSqEaL/kudbzyEMba Kg1PNIs4+BxOY6GWEcyCJP89rURS01QxDTPjK2qPxnLKGv4vZaHgAS3XD6mhgoTAL6Np lk6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BcKN6qfO; 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 x7-20020a17090a970700b00259bbd55d4asi1208825pjo.8.2023.07.05.01.23.21; Wed, 05 Jul 2023 01:23: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=BcKN6qfO; 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 S231250AbjGEIUu (ORCPT + 99 others); Wed, 5 Jul 2023 04:20:50 -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/q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agsrlWbfz7IYMGi1d16GlK2cSyOo6dIsR3pfa7abuNrXnvZWtZMMOrQK5wyQ2HbPBjqFkq47Yh+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 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?1770568196575136013?= X-GMAIL-MSGID: =?utf-8?q?1770568196575136013?= 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: =?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/QoKEOu4zW2WHLMJxAaG9EQj8rlU9vjq8xUyev+WZGLagm6JQ/xPOWAHaTGcpBaRMDu8xHAi7x0vJ1vOn4Pkr1tqAQUPzeHo4EbW35OhYwWOiBsNO7J9o8dNO0lBCRQ8wUHEcLP+cglGmGeEWwrIxxdcm+PClZBKShWDkam5ECvLFlv+z3O6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S-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; } From patchwork Wed Jul 5 08:18:55 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: 116018 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1714376vqx; Wed, 5 Jul 2023 01:29:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZkWyIbU6zRqWR6xEMGSXlUEdBKGerJvzZlmk1Twe8z5ZYpAB/MNthjJ8ZU9OILYQb/VGg X-Received: by 2002:a05:6a00:984:b0:675:b734:d302 with SMTP id u4-20020a056a00098400b00675b734d302mr15207582pfg.1.1688545757736; Wed, 05 Jul 2023 01:29:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688545757; cv=pass; d=google.com; s=arc-20160816; b=ztHUz4Y/hOUC/6Oitc4il5Wpp/EZaDzdvYc0Nge74SfE1jOCNu/ORnvsMuGMM1qlwE G9gV9/gHytnk7gCaNyrV0d0XX94PeRJ/vWNhStupjziQsRS9NtdvsCp8pnmtATeZfKMF D47N8KMshqCtkTI1bMYN6CwbAFtBQ0hKxl0voIXdsHLWuAARdSOk47dvUv5ouB4Z9qML kFvEMky2MQpWHG5CofqcoxkSCr0wmK2irsbD0X5IwaeqiJUNS031zmrdHfIIzlyis+sO zIBrSHIPvCxHZ0vVPm4jm/LxL87lWdAig7DUKaDf4FKnJKRb1TTubzAGhh266hmuCt65 rb5w== 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=LBtXhkqpY+MAbVIK4ZrXO0TtwYZpnTQ741WVcjdyNWQ=; fh=JLvGLoF9+6BGRt7zvhcm0h0HnlD9TjmuUJXRqPNlUtc=; b=VolPbLjlOqc8rGV9c/f4k7U8eCTu3+3IjCBBf6WN7cIDAAWSYL5vYpJGufqIUIPSlm NgNQIFb8Y3GTm5mYDdpqWxo7woLQ3S/FFFsKY3kO4Bty8dZvDnPU5o9ZfwybostWheU4 yL/hLHWSJQxPMXr4QtgrTCvpaJiBUYVcJex+twfyGedTAAdDmvsmv0+8lUkjuURfZvAU 7Bb8UUz7ziTarSNsO3PpnrIzYa27880CGD5zp4Ibzaxd4bd9bsHXWYEEUcQsiCCsWRw0 yoyYVyfeXlSkAuN0O26elrBOM+Oy6MHkbdBFPVNY7Lx8Yv1+iXRXyYj+iN99AmCuV+5x Yh6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=CpCZI9QD; 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 ct6-20020a056a000f8600b0067d9a4abc7esi16341435pfb.68.2023.07.05.01.29.04; Wed, 05 Jul 2023 01:29:17 -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=CpCZI9QD; 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 S232437AbjGEIVM (ORCPT + 99 others); Wed, 5 Jul 2023 04:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbjGEIUp (ORCPT ); Wed, 5 Jul 2023 04:20:45 -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 887002113; Wed, 5 Jul 2023 01:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bK34RRxNYn1XvbPP11Gxu2uy0q8RBMYDZD/RcfJ4RJFsT/xGTiHVgFBpZW9HcbNaAc3wfK5NkqqIk97Ac+6g2KhKfQ7UNi6w/vfQqyIyGDq/o97I2dbQBvxOQnM26Zar+/ohZH/7Y8TPE6XkL31h0pGtkMPpSaHYPyJ+GgzHgcM4ynSZ9poY6FtCjZcaKKWpzRBF8egv1YrqxpZQLHmJl1w44j1kN08dLxhYYaqGyvoQVEloRdlb77IbJmEi1D5dR8L/86T5wI27KNZUKvYLFfydaphCKfHTpG8LTpvW96Gan+/U390qpbfqglMHVncZgh9GGdbATjRWSYrqq0Rf/g== 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=LBtXhkqpY+MAbVIK4ZrXO0TtwYZpnTQ741WVcjdyNWQ=; b=e+Q4PibW/XY5yFHp/o0AqRQFMt89hOIwiRaomoNJOmymX2nqappgsW5WjEWF8LNw4enWXmV9EvuTzejrkA8jORjr6WT1vNkyl4ujJxrV7WyQLPTLmtcXeuSDYuCT1aYxKKJ80WaHHq1rDo6yz0XZWQgXi2IyhAxEoWHsBoE4Oi35+SwbY5VXJJniPXvF78F1ygGxqp/JeHn9i0qZvvF5k1x0H37MNpSS+z6G4QydJD0FJGSTXgHfWSOo1bJtkP80TiPVbsFHs5qUnGZlY9Wh5ZEdoCiwanke8CkIsf06jwrrlKodjv5irXF6bItI4VUcJVidbWSbNWM8zNAHp18X0w== 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=LBtXhkqpY+MAbVIK4ZrXO0TtwYZpnTQ741WVcjdyNWQ=; b=CpCZI9QD5XgTIaaRI/Vnx4PXvc8imor0fnZfM1vxXCC24+LSXxqA3lawRLjuDF8h8e8n4iTo5uH4W5uEda7n/fQIiGkpfklNIhc7rVDREyc7/qCopQy1CkXq4V6yRG/xs7sXJ+x20ZSm2HtKKXbKApBHICyXojbeFP3eiuZU9eyFSCS3L+hEUt/I0vEH4l1mur/fx4AbauJ5mOvYgyhW1NJvLdj52atZbfjHGhEI2mpSJYWGC0zVonzw+e7ykGgULmnVd7EwBdIvYklBvVkjuINhswY/fz0vnLiixmU5rfzsCCoDldBF1LRfh8SpcutSzPhr2YcFh6goIy0SCyykcA== 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:14 +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:14 +0000 From: Yangtao Li To: Vinod Koul Cc: Yangtao Li , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 16:18:55 +0800 Message-Id: <20230705081856.13734-4-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: 02ff06c5-8f15-42b8-fc1c-08db7d3084ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CYdLAEzUn4NPnqK4E7z1SnUSfwdmKXJuG4ymnfRzlXEXTryc3LLiv9OnB1gUqACGYt5uh1hNr1TrKI2Sw43/tdVCBEnoIUCYjaHJ16j3CmjA67KtfqxKsF958JsyAKbxX2oBMwcUHrtC3HllKMungooWu8t1NGPZeoD12elbelId3u6SBl6PYZV+UeLmHgsN4/pDM/ur3ti5PCqTl342O3cDzxcESmO7olDv0PMNUcgI6Xi1GbvssLA46YsqwLcYzJYaYa86binrW6ho/X0POCx4d05HyWmvEkbFhpQNs4JRPEUjtNcEUNcFkMxfiT73VLE5oPg4AWSSz3L95FAtZeoCbF8IfTOO4hwjSiTvSOL0sNVGFtOFQHPipqUmUM4OT8XSr6FFthHB/XJqRI07eex/vhXA2AdcT7upocX8P5vwr+T6wigF3pavTIdCncw5SOJ4hD5YDNttQAr/zmBqec1kzVGsvfjkk0AE1ZA1e7Ou1ycGpvSTQSDMKBBc12Unta3h6Pwvsxk+XcGIuwurOZan0fwDDYAFLxzT2vKo78iD4KV07BqKAKENaq7eOCfJZbSylsvJ+itYXD5LWxEAp08VrN0K+C7knV83cQnuEPQi02vx/hcC75OYWhjBNqAO 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)(6916009)(66556008)(66946007)(83380400001)(8936002)(86362001)(52116002)(1076003)(2906002)(66476007)(5660300002)(8676002)(41300700001)(36756003)(6486002)(6512007)(186003)(6506007)(478600001)(26005)(6666004)(38350700002)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +kIWSsbP1bNDii2d5nuYIWKw2z54ZtkLnK9orJyJQ/MUjQ65jbbJ7xbTegt5X9XMkDZmZpJx3RBitCWWMY3qqMLOAeMI6SnwiIJu+6JfaPg8mfLgLfk6IMfQITmJzvCH9O72YiBZGa6uMUKVpmYyISssJN1xpB8gUCB8zCSVDxyUgEMRqtLoNCZHdMwm2zXC+oNhW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q43RxjFsTQ1tRz/TMymcEnYpbxmzRB8UbBz3a+r5oln6AMQpVdOlwFDG/Ztaz5Unub16JXiImcbmauOOPDG8+8GUcojuKZDybupQMjx7KpkcR2tbLNE84zKhg0RqPcEZNnPngECgHQfjMeTJATi+0xs0N2/PFL4PrCmzCB2ldCeYDajMUF1SNkp8+lHhfMaqNrD3pUBqmXC9u0ZIuI9HHHuaRboNUKVXG+q4X8lTcZlUIctamht+Sc5ES/vI0ZPAFPFfPNq0tUh5n9j+txTFvrr6HpvbnrKhyxroi7zVvFUgsOH7tkD0eXKOg337fj1Aeq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02ff06c5-8f15-42b8-fc1c-08db7d3084ee 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:14.6560 (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: WITXp311hdLcxW4+0t/1J3aN2WflQjUI9/jV6YOtGz6A/vCZVbFE3D7QnCptIlCinj4MMIt9Cmk4OyO45SsMHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5119 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?1770568556804002437?= X-GMAIL-MSGID: =?utf-8?q?1770568556804002437?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/dma/sh/shdmac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index 5aafe548ca5f..fb3c56a416d1 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -678,7 +678,7 @@ static int sh_dmae_probe(struct platform_device *pdev) int err, errirq, i, irq_cnt = 0, irqres = 0, irq_cap = 0; struct sh_dmae_device *shdev; struct dma_device *dma_dev; - struct resource *chan, *dmars, *errirq_res, *chanirq_res; + struct resource *dmars, *errirq_res, *chanirq_res; if (pdev->dev.of_node) pdata = of_device_get_match_data(&pdev->dev); @@ -689,7 +689,6 @@ static int sh_dmae_probe(struct platform_device *pdev) if (!pdata || !pdata->channel_num) return -ENODEV; - chan = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* DMARS area is optional */ dmars = platform_get_resource(pdev, IORESOURCE_MEM, 1); /* @@ -709,7 +708,7 @@ static int sh_dmae_probe(struct platform_device *pdev) * requested with the IRQF_SHARED flag */ errirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!chan || !errirq_res) + if (!errirq_res) return -ENODEV; shdev = devm_kzalloc(&pdev->dev, sizeof(struct sh_dmae_device), @@ -719,7 +718,7 @@ static int sh_dmae_probe(struct platform_device *pdev) dma_dev = &shdev->shdma_dev.dma_dev; - shdev->chan_reg = devm_ioremap_resource(&pdev->dev, chan); + shdev->chan_reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(shdev->chan_reg)) return PTR_ERR(shdev->chan_reg); if (dmars) { From patchwork Wed Jul 5 08:18:56 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: 116020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1717613vqx; Wed, 5 Jul 2023 01:37:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7x4twLqRGCEFUgllD4jSg6AwDYftQZ4MHWx3TyacP7h6f1ZnPOkbZ6yYBDeVCpcfQOQ+hG X-Received: by 2002:a05:620a:22ea:b0:763:e407:4eec with SMTP id p10-20020a05620a22ea00b00763e4074eecmr14331643qki.50.1688546238089; Wed, 05 Jul 2023 01:37:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688546238; cv=pass; d=google.com; s=arc-20160816; b=t9qkbvOftbWUtb1ZG5MnDk7h81SPopRvqIv2hxLL3TDzROnFdNA15qe2RVraAT66hf f5WaLqmxeUXcQDbcpXDUQVnkrieaKE/8PVnP5X0E0PE60xm8+/IVnHNTwbnpbuo5r9cJ cJoiwe1IhOa3Oo89802OwgKCabNYIdw5kkpaForSDw/E1FJhRAjTnF9fj7RzscXLuF5a LWsaftWw/EHIJnjD/mi4RJUYIsFNR1nIIhXP9SH0Er5Yr8lSOU1dNz44Hbv3EGg7MHf7 PYpXgskzBkTj3c5Vm4gDAn34eXCVmw9d2lU8ZqwDS6/yPqEmQjzhkhEhnBo/WB+ej5wL +hgQ== 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=rFAjjT8+kNbUdbkIoD6wpN24vp28qG6AZ/yOH7wdkVE=; fh=+UiOGVW/EyAFgQSg3J4sSsfrW1NUPAQQkqnOdekd514=; b=crTmoFBNQP3EnEm3vb80vtDi1FSUIR5NDMn2GbVBtwpXPtBiG8XYJNZjWIyWR/MJ9F ZMsyF+alfFG0nUL+Kow9BJhMqN6AhSAh8PBVrkaPR8UpHhT55cGM950rwPbZ8kPkztQn PvvyBD59e3kdsN0xpY9YygvkW6o0hTrMImNM9LPXgOsgoQKA/CpGfGVHk5ilHh5bDjS8 MewDePm9sDffaYgIH6rS3g6e14JOsp/k8BL8KFBnn+WbAyEFOo13JQ9xF5xsEDzXvTVq sTYyg4z8sKAZNK4zImcRI1DtgI9MAPetruOSuh6RpxSG2KgS6AiFcnzm910v5jjS5zxO RduQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aiHO0oAq; 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 cp12-20020a056a00348c00b0067dac801f59si16452683pfb.224.2023.07.05.01.37.03; Wed, 05 Jul 2023 01:37:18 -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=aiHO0oAq; 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 S231514AbjGEIVW (ORCPT + 99 others); Wed, 5 Jul 2023 04:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbjGEIU7 (ORCPT ); Wed, 5 Jul 2023 04:20:59 -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 3A3A9171B; Wed, 5 Jul 2023 01:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WJftutNMve+utjmok8zQw7jn0dMsz6jCFNUnDD0zYQre5DZxkGDOZyXrI2jHNtkyPheCRkw+c/veWVQ/D/o1po0GDfzfrN6+ngbFsVHeaUmVJIEXfig5ycXvghh2SVrk3jHW/TPrVaRxUta9olw8qorSSO9ue2UiE9tJ2+6Qt4D4J+DKJpE1tfMNGGQJTa5ANbXdVihu2pWPPLFChhEz1FRKydZrE2+T0LUoA59hn+fO2MkhwiKepTtoE6zLDczwZeCI3q6oHiWvsG44lgN4IsvG4I43AxNeoxUm/KKj6JojRdotEm2jlnQrxtdBvrl5jzKHUNzDMbZXVUDlYzCWmQ== 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=rFAjjT8+kNbUdbkIoD6wpN24vp28qG6AZ/yOH7wdkVE=; b=Ey6WW3oC+IpLTlPi7hEkJ5G5LRRWTGyIGbcJZlivKjMOuVEDHJFU+jAl7dS27T9q83LA/DaTLKLYwk7egsqhe+mFiuO5blSkbqWk7DE5G2Ogng41aQyxqCxuMV0z6jdiZImLJhcITgqbsY+cYArY0OFrI228Xkn2hLfT05XYgFs8ADYnn+ozD1EAeJseLtwLOu5+H/RW8s11dUBIKMCk5wrEOkk0fE8x3/Ss1ViRu+UkVxvn+BpM73Rf3kDCwPRk7DhOdpal3+01EDtuyRQ52pc4GvK+2mKxAG+a8MWnISOMItPeFMh7Nt7U2KkY+2nytXa1bTbVVXeVES6w2cTLaQ== 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=rFAjjT8+kNbUdbkIoD6wpN24vp28qG6AZ/yOH7wdkVE=; b=aiHO0oAqmHwKZAaE7R992vDG3pGtUo3w8AgMGBJjeVXTB4I5i2oEwF7JkE/ASAmBBY5w14h+2Lcg6XF6+EmItWq3Tmx5EM2ppGgxBW1SeaG5aVyRCCmyaDWumViCuVHEwBkAgju5tuwqpPHBWbOXHDidfUW55/fuAslzMGhHV0gU960V3KaD5QG4+s/ejcQtYK8tuwJYM3eLehQ+h8yeWv7Ci6GjQovNvbSoD7yyHnBXwsdY7ZZLVzk1lWPp0Rio5N4nQL48d5KKuCzP+jDnLEwwDMPmIixoN+Tf5S1/g22DydGjd4GdcjzVdGZMs6tDpfBdXhIVdimaWPT2wtx4ig== 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:16 +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:16 +0000 From: Yangtao Li To: Vinod Koul , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 16:18:56 +0800 Message-Id: <20230705081856.13734-5-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: c45f17bd-14bf-4038-a33c-08db7d308629 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DA3+LGi/tP6hzixr5UEnuPK5SHCiLzdWM7hyIRpNc/65SZdFGb83d0PGpX3zoovmv+V8RqW5CoHGe9i9ljWaAdM9DusSHYlFrX9Ton5tSz/jhFamanDKeD4bu3AFwfKQ/vbxAcl6mVYcEmmNgtLihciXg4Ni4bGV2+gGYcy48+RMjW1d/H4rrnA/NCh6blg+ZmfaSBI28svv+lhaT5Q9hjmcXC/mSbr+cnDi7wsgP9isSDAdR1cRHNr4GuchZqv2mredmBG+YYa21bPT4t1BOS9vChUtCX2Z4OZSdu1wO81PZLgMvsij+Pa3XV6WwavqMNSM+Ow3AMuFMEuG0f5pwbHz3G+wofYzGlw5EqLRXYJyK57KNKpz7BO+hZo4/rDFeniAGtHYH1KaO+QC/VpP7rq+5rc8jVsZkGsC6divZ8xDoYz6MKgI00t+LY1AYYeEveQmQKUZUZYEhbeeJI3sKzC+btmHVvzoV/9dHmoGC/orSEWjp7nSPELUVV+Q+tYmLnmAnvovFYC8yNN4WBdOfCgN/YSmD88Fyv7ebfG6bQIfGNMl2eNI6ONPi3WOFnWqgxjic9/vRL81rjKYkCqX72Rul3pdyJeNe11PA4JoO4ZCUiJALrVwndhwqXqPacWa 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: VagdK06blecNeYS2mQvfZk7/zEELVpKCrbQU4p+i962dKAbLyj1nry06BpGNTlqd4da1FZ3h2hvZULg93afy7wWzXW2mH2g7qYi+kQcPqUh1pv7Uc4/4DCzW9RS4H+bbvXLnI03IL1qnecFAJz1HWi/NyDqdKOsLOsYgXE1rManRcuFL4D9V7iaQQGkMxj+njbKsAuAi6HrH1XsZr5t/XWkVmnY869vsA65NhOk7/zPNgPdavspZ7EzotLH2LPbscrmpZ6iw6sZtKpga6DHlw6YIOVsDVA+LotwprYAlWNrz1lE3cFrLbOHxVGITxbTcFTlJbiSkOrcODWs8kuxMTNz6onDMErjWh2X/d9KRk3WYuV5QxhAI/qHwOqt73oviv6IV8uH1jg4PFkqC4xs2Nf2Etzn96s4cRjrSq+Z2zX7uxPbzH7Di8Mmxs0dHGlypHLtMc/hu/mqabwdy/uYdLi1iUtvBjCMKlgc2s+uQTeawa8ah/LF8+ojG6q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VZmOx9iH8Mt5i1d3wiV2so X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c45f17bd-14bf-4038-a33c-08db7d308629 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:16.8013 (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: /Yr5cXIvGTVjrNE6O6tKKkmTfw2n6FH624ef1IgRUv/Sbdodlkm8AZAyJqoryPoEgZp+ByMSCcZt+iyYuzT06A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5119 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?1770569060049107100?= X-GMAIL-MSGID: =?utf-8?q?1770569060049107100?= 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 Reviewed-by: Amelie Delaunay Tested-by: Amelie Delaunay --- drivers/dma/stm32-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 37674029cb42..5c36811aa134 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -1581,8 +1581,7 @@ static int stm32_dma_probe(struct platform_device *pdev) dd = &dmadev->ddev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dmadev->base = devm_ioremap_resource(&pdev->dev, res); + dmadev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dmadev->base)) return PTR_ERR(dmadev->base);