From patchwork Wed Jul 5 07:21: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: 700170 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 D027FC001B3 for ; Wed, 5 Jul 2023 07:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbjGEHWS (ORCPT ); Wed, 5 Jul 2023 03:22:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbjGEHWQ (ORCPT ); Wed, 5 Jul 2023 03:22:16 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2105.outbound.protection.outlook.com [40.107.255.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC7B51AA; Wed, 5 Jul 2023 00:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=haoyYkSFptOUUb8hDAn+6oUKGi7NQw0mSSTo42aIU08l+QpMFyh1gjWK9fSG2b4ZUEttmLsHkuG8umNDBskMsXgUMWpiikALrN5bVT2TdjHMP9+a/lmhkNDUPMFkDNUHA8DLRbgUdtR/e4MYqbMYSIG3vYsKLYjgoDY5Hmds+BpGEtbjX4cq4qQvg6ovkmRgtyvnH1Jeo0SfyRbP12Ywa6SsHM1VrD5/btWlNWLtbSVjz2iSlpIk8JExkfXV2IjQUxGmuClW2yn+7p8+LaBsKDBfLdPhQXb0lsl+2C8F/qPUZmYWOoNZYP5rDFudZwHLjWd+mopherPA8ctTzu1UfQ== 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=F3R5YyqcPwxpMQtiojJc1md+fTHDdQXOdD1Y5PaxsZ8=; b=EdWO4SH/ybshG+Gd7O0GgJCgAL4molZm8BECYHEfUqdWyVhF+De4DvDdAMM+zn290WFoiw0umE09TNxG1f2hH6dz2jrYKyW1WI/u/RN+miqrY0zExVp5eX+ti2GLGDnBbEihjX8cSW8vHhEAiR63bCzzHCJm9JDSyqksh/iti1v0u7GcrawGA6UwBxc38pBNJoK9f4BUxeslUi/dd0ME9Fro2d5oXWx58+npgFKuXcX/6/I8V+Fzwn2nsmceutit6N7ZaRzTUt0ek49DVYgGHohs782/NZ4Ijk6tELi/Q/OdXW8Ufn/39ueL5phC+shdVLdskXoEywIm1MW3hcAsyw== 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=F3R5YyqcPwxpMQtiojJc1md+fTHDdQXOdD1Y5PaxsZ8=; b=HeaySCT2brIPG6GPTw451FjtHuthfl077zvqnvJDMZw1nnA5jmtOifpebHD/hCFNIrIj/CGlJRndp4WBbGt0ueIZ4+Dp+lpMkybaeoyRahNwGgjvh5//y3w6S+tguDHyXXGf/AL7W+uCvTDgvwTP8CqegqvA+RExvcr2S7sDYCSgy/0ECNJZywLc9YrIa4G0bVWhHel6k+EALjo+d48jpXjb0lfocwcrptR2PTccg5sWIVCYnEy8vzph9xDLc2trwyTJhV8B6OOwEff/skxE9rDja+1ECZSffRGeAdijsrfrJ+e3YgS4tCFNToKqGZGhnZjGvfEMF/h0LUzb1Pe1OQ== 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 SEZPR06MB6058.apcprd06.prod.outlook.com (2603:1096:101:e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 07:22: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 07:22:08 +0000 From: Yangtao Li To: Herbert Xu , "David S. Miller" Cc: Yangtao Li , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] crypto: omap-des - Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 15:21:54 +0800 Message-Id: <20230705072159.77221-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6058:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fea12c7-08e1-4f57-b7c7-08db7d288a90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IV4LrkusXAXi5q7s7vhMo8xTouRmRRRze+/Y1ruLjlOpe2mCklbi+5skP9AodUYjtmSlj7kTISXjPJaUDpJJXFodHndfATTdSU4eJtF8Q7z2N3+mimxoERh5ot5z9m4/XuXAn70w1VXb3W9D0K9/OdfNNxTL2ZW4HSuT+2QMY4vsuKR8ti3rdvfAjERN8xrDSu0pRT4ZGPU7u+bRMm6Z8YEf423jxUHh55zuKp3gdABEKgCC3dtTiNP6R8NmcysQqY+Uz6Qg0nwbB6HMCovTxbwFX4RHjdNr7ZHq6uPe+crPO51ua5MLxlYjupPcmrYWi1mE9cIFJrgQuCaAO4Y6d2FNBZxIxIDsIcncGLy/ixj8MH1L7lmcBbjIMH4eUjpNbLUenrBLbm+e8PWvZz5fNr/LluVGSaaYFjjPmYw3diebiL4rah7ab/ATK+NH6I818NwpIodcJlMK7t0O3DPfKcb30zax530tJMfUQOs14NE7Nf2i44DSapp8koN9PTVJIzsBIBlNyfi188w3ihGcG9UxF7/phxf1V4JkrzAXOqBHllsgRcuZbJwPC+T1SCipMsNRcJQ/xMiGIQ1FYZ+HwvTUwm2ajWdHo9nTZxBj2nCKgVE8T4D+JtPMygNmqckD 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)(366004)(396003)(376002)(346002)(39860400002)(451199021)(26005)(66556008)(66946007)(36756003)(66476007)(4326008)(316002)(478600001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(38100700002)(6666004)(1076003)(186003)(6506007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EUaH7ayYNHBAIG3D3gqbycE6puQ3KgnrUr0e6NUszXNXe1ISIMXXIBAnorGkg/liuDIUD/u4erV95tQbzuSVv7OwyP/jtCSbO9st+1/Jlhi3oBjToKN3ToIbajQhWni+tmNeDmdAc6ncFyDR0aSmSj8x2euu0LU1WHLPFI6w9DA4xFWRYkvPxXsT6+Zf26Oq8igGmJ1ua892zvBKCwlY8m4PVbjYHMCZjMZh+zfACT3MPQaL2N+Rp7P0NJE49Qm7fZQgBauRukyP/IFHsAT0nS40gVGenAF+oMv3PgDEu6FJQBtb0OPwjomDPpgV08caPvKZ8p3SRf3Z6siGeggXpO7HMURPfJ3keDJMRbWQfQKsMP9RB/Rf5geVsJxlsSyA4GxYKORiDVEfSEU74ie86PGtbsagEfXhD5g0GI68w1fV7+ZSodbRmDIGTyQNVoJNvI6rJQ2K4V5zrWxdUgvNhab5c1KrUvtaPnycM0hwzj9z7pisjCoGG5aes4hcFfBt40LttlqvittZPrGQb6Dr5M4j4lCV3eqmPDGMuWgxBdkX/SkO/cBYu9T29boMPagd5AmWt2PdMObkcCKT4cwdcdnq7FyDeGBjba0PqajpdjA9rMUDhQTtM+A4ZNNCbvIfvtKt4PcCevxndM/NvpgbCKQdsVjpmTlII1aWiDIsvV9G4WG4uzGSR/Ux9M9MCyAM529hn9EfOXBYa7TAkWKPGxSvOlyL5YaYYt4cl2xrpycjxPF1j8i1+beXj42w1bOasEvLd+oCFjSz/WW4PwO4rB7MTl+gwRIvlf1TFIIO83lwH7AOx7OKIuY6tK+wnlC9gobUf9ndQhgVUbkH+4wJwGfAPx5w0UOb0TScQsgIng7D7KEgvrTy4JyWzubUK/bbNzdEoe7Z7jX+F2CpTkWJGXTR0kS5NxBsIbkufle91eWMtsjV40NObIyWsEzGJdPDp8HJzqdAthYrxYq05Hmhw+Fm/UdZGlHmwEefe07XXl3mhaBA7V1bLKXzY75njHlvwX8Kkr7l5MSHgJKAKHEq/uw8Rg7EKD7HvlM+GL7ZHHFkTNkkRI+7RBVvd0prbEjzumWP5ghYIEh0+dXQNeIP6wHB83Sp0FIXulEd0E8JZL/Maa4HJtZ2wkxvw9xefglWimZXsmyvTWgpeceCkYR240J6p3zZl3sGQzwEXn9YUHCR6j7M2Y6GRMkNHVhkZrui25UdMQt1cMVz+Ynz2/gxGZUKMSsZnAXRtPGvUbP0D0NFiyHFWuxEzpFZXhZFskiba84IcKN/27NLZR8JEZTtlKRjsjxli1Htns4OEZUyAc4sOpaE/+OH9NYsEj6n8Lp33QVUcLc8dQprcfhVYfLMYsCZe+N1h2BsPBDqfwxJLRvbdrvZbpcYDwdf5xPRtcbERYj1WrQPOaMISLV9LXqrpoKlnUfzP6w2a+SBJvl+jyr6mWUvqIB5qWB2NH0lmZHsCm8F2yQoR2Co/r626SnNptDQw1tkPydYrTbFhpi1V6rMhPDxt8N4C7lLN4O/GE0ztcQ0Y3tC/veeWvJnP4J41+vSBr8BnTbNqmaQ7aeL/MlYCaJEnhSUH50a0vwQI1zA X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fea12c7-08e1-4f57-b7c7-08db7d288a90 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 07:22:08.2270 (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: lfdIyfJoymqZ2jjLaK0vLEJtiOkwhTHdhZJFqPyXfvj14Ua3tvf+3oqQec0UwvIFl28KseYxuJ/Xvv8C4LBnyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6058 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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/crypto/omap-des.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index f783769ea110..371a51094e34 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -971,18 +971,12 @@ static int omap_des_probe(struct platform_device *pdev) dd->dev = dev; platform_set_drvdata(pdev, dd); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "no MEM resource info\n"); - goto err_res; - } - err = (dev->of_node) ? omap_des_get_of(dd, pdev) : omap_des_get_pdev(dd, pdev); if (err) goto err_res; - dd->io_base = devm_ioremap_resource(dev, res); + dd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dd->io_base)) { err = PTR_ERR(dd->io_base); goto err_res; From patchwork Wed Jul 5 07:21: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: 699316 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 D6A1FEB64DD for ; Wed, 5 Jul 2023 07:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbjGEHWQ (ORCPT ); Wed, 5 Jul 2023 03:22:16 -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 S229697AbjGEHWQ (ORCPT ); Wed, 5 Jul 2023 03:22:16 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2105.outbound.protection.outlook.com [40.107.255.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 023CF1A4; Wed, 5 Jul 2023 00:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q78mJkuYuFGtcLDGy36fpIVfUo8x6Xdaehq1Ydk/bKJE3IF/TvxJz1cS0Tj+QeprW3o78uliFG3sxN0I8MvfZ23YRDMafhjtLrC2b6d1pVocNbpapFs16PUJ/IPiUZHiR2uckaGMyeIPAXxQYvqVxfNOkMqPJi6L/Ms9Oxfab/4Pt9/EuefhNwaN+3YuQsCPyd8AuM2EWRBJSsWGQVa7t2Fmg3Br5uELweZ5pyx1VDdFy7z2rRCW0M0Q+8sxg5C6o4qah4+HamAYvmWC4krhDNd2my9VSL1DMy0DHV4RQTZgammMa0n0kcNffOUhOVrf84J7KBW/Px+DJH1MvxEzgQ== 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=Ni4NMIq9gwaRLZlMszJncfYmUddIMbEeqAHECI08eto=; b=BmI4vbNWute0kVT4QdLHnOGUtLf6rnNFHeIHkrVV3W47SCihK61Yv7lra5F1hWqTCXdIRdyRT+5LBJvF2YY9cV9WWQJXg5d1XBexTswhCsi2golyImBIukOOZN9/lt3nKCN+HjoD1DZ5yPYN/x75cWHY7Jeh3ik0xgBJT724UgEq3qZceclkqebyrdEuQqE5hzaDxqF68UTQSsgRv/1vM7V+sqOd1TJA6mH+iQqhe95MuAVTsVanFBMWNLbcQ/2Hihw65MU/VBCm6bOtC7HpaSMmkAZoPTQ9VtTtshBarIeYtlalojbCk9SsaDO90+rOfzNIz7olvoNNY+N/700ZBA== 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=Ni4NMIq9gwaRLZlMszJncfYmUddIMbEeqAHECI08eto=; b=OW4V7VouM4qUeLIpPiwPgYq6tOncCLElQ+F+lfHAExIhroThtl/S/AGyo6CHxrQrmwuRbvtscRMWuIYj3iR0ns+5qdp7aqRp126YZyv3R1HM/nlATU/4YZOlGTRyIjgavWENxjdaJMOPyawhsVF8XZKGCZxlmEHfbTMjfQrJd3UnbHIUmrg9DQkvrjX9cGm3pxK1KOGFULHckTnEf1IpCni/5I/Wk3fUQ6UGZYb91ZcFPP69jxvLbP0deS+DUAyodljG8q6IAp6G0ra3bFGt0UzDyLRNQJaNVmpXKqQwDnAih+mo438sRq0N35Z9Svlbw+eOF1MlFJVC2KTmRpyKLQ== 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 SEZPR06MB6058.apcprd06.prod.outlook.com (2603:1096:101:e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 07:22:11 +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 07:22:10 +0000 From: Yangtao Li To: Daniele Alessandrelli , Declan Murphy , Herbert Xu , "David S. Miller" Cc: Yangtao Li , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] crypto: keembay - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 15:21:55 +0800 Message-Id: <20230705072159.77221-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705072159.77221-1-frank.li@vivo.com> References: <20230705072159.77221-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6058:EE_ X-MS-Office365-Filtering-Correlation-Id: 56674066-acde-4327-b872-08db7d288c2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ViswoUS2bIbgO42uOszWH0OSPr1/HC4kXSAXaMwq5tplmn+y7JI8a5X404RpMTvJTSzcZbgwIym9qX8yzjYqHF5GiVCEDiWveDTqZdTw/0EvHmV7sVGABAolyxTD11eUXV7BhbJYnA66r+Ot4vVq85Ie40yk0Q9+nqNhYNLN9RTKpMX7aIzWgN476az/TuHxS89RTgXrdQdvlrhLeJ+MqDjziqnKo2xApl7kkApQnjqOTc3aVH8sIpWDV6cXap/Jhu49tNWGSVrctuW0H49cBdf6jjBbUfOIS2rwu+sFH1ougKGab39yNkoo+5/y1a3j2YYqs5MADBF0JEl4Gh53RwZScDQMcDPLecgMO6OHlgNK4tJJ82y3c4Ejbcqbek2phyGBbT1nIUzeuDkhGOWmKyuoKxuhbR5Agb+gp0jQG2XjjNLVD+zv+632LCC8pD5sWn4DyO0LwuaiBlynaqCIiP5Gto0o9nOJADvwci1Rk4zjkOXj9i2VsWmUe8V7H0ByyB3OzUAnA++B/EZaItP0iq2kM0tr0Cq3BjMQG3LbwJdIkfboqlTe7z7bFBmdKQLhaRG49Os+34+jLdEwVkOYqHAq5elsk+gj/UoxjeA2lW8V9emRqFrn+QmU/xH6qVKt 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)(366004)(396003)(376002)(346002)(39860400002)(451199021)(26005)(66556008)(66946007)(36756003)(66476007)(4326008)(316002)(478600001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(38100700002)(6666004)(1076003)(186003)(6506007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MM3XFkU+u69AUkytMmbtytZvw833V8VP8TMbg3boJVmWRmN5dk4wmCi7vc/3UzY7c6UpIl9C6klBMl7zORpT9SL/k/b9UQK1urSGpv08W/7OIYjIr8WxQCW7hUGoemaEWK3hzBbM4vOEGWDIaxaRhF/6R+7NehT2+i49N8uJJO54xQckshpeWeCHLdEmfzGxXcaQkKwGP0pcfSmAkoEruPgbLuFI5VU3U9oaZJiSOyaNDPy2kl1o8RzSPePSGEZ9GEI8hIZxuE2jgAz5KaGIi4xPRoKe1p2lM1Da1mqLBWAh2z9wskuu+8aqUKRaZCJn8TmURWKTDJ7/9yuY/ilE6WlxoGUcIdrjlKx4wp2f7FNrn5QxvFfGFKaPRwLEA5DYYnpLCksqPhY4aiwVy3whNUyiupX1SZ39sFhXG00ClDGtpVNzuc703AimbXOWTrUaoWRIzzfoB4WeC4cAHkbrLYB6fxail+vmlZww2217TISpXv3GfN7KsG1sA2CiNI6gicdRmGZe+5qVF0WpZiU0wPDgC8Mu/+PcIar+7xM0Saj/EPokKoS+az1FL7sExFFIBmTmlaovsF3YmWgEiXgxT3zasOB6NMvxOE3O2YB6PpTo13PUoGkBZV4Gm0ihxvyqXJ5tea1EY7WBM8DNPkpmy6y/1SyMqovkSUGy5XHfh4FW9dv2fyWMcB9hwyAAK6P0Rg3bcuXxrDhaUNA3iflbIbQubNlH1UYqW2LQD+sGZYpuWYoBdU4UO4PThza8DnM0vBypS7eK37kaXuvW0/sojRPLIMr0UG0ooU5SxyRFkMhL8VHcW3RkqO2eblOzX6XbMw83BlcdJAd6HDUV9VQBj8GU1xk7EQqmal1M572shOB6B35rFVlNwANcVMd7MNzJmZ/5OPv41r/AEL/iFJrgMPfE73r4JZoCEbT5f7m9v4jcQQ1j/VCjVCmtiBlVBS5JDXSp/Aa+BlmYeWyrlWMxqiWB7NXcyEp/rth/P4yXkM28UJew+Oai+/aLWo3nQ865dzpfv5AnT3zQeMJ8XnrhmO8+Ltww5QEq0TRG8gTXndpIvqEeHEMl5DreuSBXjzjui12EKJa9yDjCusbz7Qq+BAeIKLUf4bbHNrC9pOQHfYej0lQau9WUe0T954sO+qOHKSiFj3Qsappt9DCykCBvMFBoqh9hISxOxHFneNSxpPgXQXKWRR0VmVQ0YTcJeBpeSyzLrRWA3Y4iGQKe+qAnb6tWRGwqCwSumY2QkUqxQyQuBeLmNNBuFmw9OPp2ubDLdO7/iceyD6ttTe/o9HBWNTqB/sX0uudvoFUlaGcgcpLcYYfxazalndx80KJYRHFPn0riix3S2EyoeFg7m/Buy7DpCdYidrcwxGZSNcs6Zrr5Vas4B/k/LqSlq1HL0QY8YM0pbuCZn3V4b1mK0LVyGqxC+8NDxG9Mh3k4Ul+m607wd3jsivWX9Nuzt4osNu98fOmhjn9qdjiEIpJJaw7R/CmhdiFSfE8SslJio76cJ/r1dVKCjsgXlfN32pBGoDB2DPlgnIbmeHWI+Y36/nzTo1LyUCLopt96NQqumvDOTu6WXLMLboQ0MTcNIxKsZQJ/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56674066-acde-4327-b872-08db7d288c2a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 07:22:10.8772 (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: 5TqWABfzQvp5TOxnKKMrJDPxS+xzb5ZmQUc2o8HxsnOsw9QkGzLGy2bAzGDyymZANIBYg0du6Fub74YriOLoBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6058 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c b/drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c index d4bcbed1f546..51a6de6294cb 100644 --- a/drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c +++ b/drivers/crypto/intel/keembay/keembay-ocs-hcu-core.c @@ -1170,7 +1170,6 @@ static int kmb_ocs_hcu_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct ocs_hcu_dev *hcu_dev; - struct resource *hcu_mem; int rc; hcu_dev = devm_kzalloc(dev, sizeof(*hcu_dev), GFP_KERNEL); @@ -1184,14 +1183,7 @@ static int kmb_ocs_hcu_probe(struct platform_device *pdev) if (rc) return rc; - /* Get the memory address and remap. */ - hcu_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!hcu_mem) { - dev_err(dev, "Could not retrieve io mem resource.\n"); - return -ENODEV; - } - - hcu_dev->io_base = devm_ioremap_resource(dev, hcu_mem); + hcu_dev->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hcu_dev->io_base)) return PTR_ERR(hcu_dev->io_base); From patchwork Wed Jul 5 07:21: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: 699315 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 79DD5C001DD for ; Wed, 5 Jul 2023 07:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232144AbjGEHWU (ORCPT ); Wed, 5 Jul 2023 03:22:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbjGEHWS (ORCPT ); Wed, 5 Jul 2023 03:22:18 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2105.outbound.protection.outlook.com [40.107.255.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC723197; Wed, 5 Jul 2023 00:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ye8UVeAO028JgCuq+ACE7O5JvUEwIpDPe5p6K/lOapuaZ1yzPdbFdgLZjRnpeK6+/cRRAORx1C2yilNli44QD196Vf961jFZbebVWtfOXjJnEi4g48ten/40YHNqj5BEjEyLseE58Z+ioJ1CJaaNeTwNZ5LuZm70/5//4b9B6piV4S14iw2+53Po5bsCy+NQ1fO1kJtqX+B1MOvM9us6OCFIvTOtd6eBimDU9cCKi/I/+Sj2fBOxPD/+PaimMpPdteNKrBpExKRjt9afVaN58WwhU9UFm60JraLn/Ir6nmUL4Xmn8xLYrFhBOgNvkL/2lNM64LQ5CtgH3ENc9JtRGw== 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=Yqm/4YpIpfV9oXyYVoPj7Fyn6Qwqk7SYVjwSZlxxkIQ=; b=ZAUYSPN1dGlVjyJkF+AM9r/Z76ZdHz+I60KG/RuqAjdfUqu9217ukk+2Ik4yDX8mTfE260Jg+i3M7tqUdREbnXlnOd0vehsiSGQSMrHjMjwcDxCHhwdJsWVP1GxogbinsRUNCXyK590gv1OXR7RHcXk5YaOXtghDhSGrSQ7kCQHxh1EWVJl/SkM0lxvTAAjTxhME2wC4Z2dROIR3uAEEujRS7zuRqfEojfL3jtPYlBv41grertOLiMIu/1dDBO2/Hcx7qOGursKhcyLmpOQdbYSq0F7iHCfr5Lv6lFKprW4yc1DIC0FiFW+I9z9TGtmtUAC8/FytA6+rDQ1zBs3ubg== 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=Yqm/4YpIpfV9oXyYVoPj7Fyn6Qwqk7SYVjwSZlxxkIQ=; b=qXgy/n4gxxI77BP6XgZM0ht/HzpUwKOC6CTkka7ZGlR7fLn0Yc4VPerTfD7A2+bgprnUbZGryal9KxL6bhMA94zCuF7N3148SAeoxoQLK9DoP6NA/4MTLVp9k0FoXmuY1yhKoojLvHn7LO7UNa+Z9rWJg/LJL1+3EpNjaKayM45m20uT33TBCrm7HqLFoTrwdvKHQOp/q+trDVvukMTmE1EMoAQC8FffO3lviNNVpmwtI/jri9kuNTGH3bdEqclHJf4twTSw7WSWm5WL0G/58RiwZrboyKSqx1Aytx4H4WPGIukvo67g0/+ug6mKDfn6AVp4e1PKcyqmCNM0HMuhPA== 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 SEZPR06MB6058.apcprd06.prod.outlook.com (2603:1096:101:e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 07:22: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 07:22:13 +0000 From: Yangtao Li To: Herbert Xu , "David S. Miller" , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] crypto: atmel-aes - Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 15:21:56 +0800 Message-Id: <20230705072159.77221-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705072159.77221-1-frank.li@vivo.com> References: <20230705072159.77221-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6058:EE_ X-MS-Office365-Filtering-Correlation-Id: b700806d-a31e-49a7-a449-08db7d288dd0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JvjYiQfkJRAvbW3ZBdziPZ44pKr7EnqIZ07k4mBjgw/gVHug8xl3pnVLaG69gXW1UXZdd50p8Vcdkpu2rzIgxjd7Ldq2Mq3Pih8pQqBLAFKx7Pz/zSg5wAG2qyjndtdryE8OwhXmZpEQj2pC/eOZ4UoyctS2DdQhSORMB28tjLbM6aVI8IDZLgzdyQTpFGdZu8tF6izZ+xMPxmePPRAyLhPE/xjCee9g7CuIs5eFpDVtH0TJwKjxR3bAfcpb9fIUFesYzDXk7nkSpQr73B9bNs33cHSmBS4Y/3JuO2Fnj9l2Q895j2UCkFUJZzhVL4ge2iEZ/3o2jWj8CkfYYJsnU7/xhqVKVBulcE9xaVN0viQe9KKs2MMkbIa768KpvPpbgnb95RZ0cFlQDBJbSzcCPMmF3WD/qs078FiOvYik2XmYQNTrRf19uwkIckhPYTvZx/ni0eK9lXhVauNEw6ZxQNvropuKEEf6NIT+xbzQVL0RF6FV2esS0GNGYv1NHhZhu6d0IUD9PSqGA/xoA+Lf1qvZ+U+aYlQkvRAH+EklPLerhfnCW+VeTRK0GIOKqUlsRbIPliOYaHIUVQPS4dBr5QIcfs6MwVrNCtPYJGcdnvRTILpD6MJajnwP2zE/w2UK 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)(366004)(396003)(376002)(346002)(39860400002)(451199021)(26005)(66556008)(66946007)(36756003)(66476007)(4326008)(316002)(478600001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(38100700002)(6666004)(1076003)(186003)(6506007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1HLdZsItSB0KF80qnzz09C6nXVvu0Em3PqwkWRvK3VST7+stIL9vUQolTT4MGISCbI5gmpRcobRpM+Jh+wbnTJ1UgWF5+5bhvOPhnjSBsXi4HcEd9OL+jTjwXJe6YzAND7n4Rl6yPlDKMc2SrsfjC49L2385R3JWv9TTwXg2qiboGUdgUaN12XCNrA+/XL4kdg+4eijkhPFlwvGcfvNLVW0j5ZCN8VxSitL9jhEa0rE0Nl49vCECXpngurGOM53AE9IujXKTOaBF2ZcoRAfdBL9zSDpkrvl53o2qpc70fPvYHKgAVLAL6lxklzK2rh3aThzHOaxbkQNOVOMn/GIwMzQTYXmKCLU6p4xqUMkJKupZOzPGQnm7qZAa30PlodTvjkCdjPNEP9hgsQpuzcKBNvdHj3G/iQB2hIC54r1DubQSq7SOLfz3+7snj4gj1tPuKN73p0D54P5WMICYgxRKK2rO5zJKqAFHIn5TVaLeoHcVV3PruasZmeF+TNSIrm6RP3F7stncWxCd59chSJfiLG5p33fxjCrDeStn4eW9QbETA/k74ZsRKwWOgaqRSnCE2vDIlAY/S9mHnzCbw4CjaomMRP7J6zhAkUW46hKmq9s8RMgXzVfPVtqzt9i1lrfnaGgUroKQI8NFnw1N3SPkkqRTKyBe967cldEPvQY4ewfC+DLEYkGs45m457A+ZOvry9f85lEuURQFZDITcIoAGadrG5fMeMuJp6EPNTaF2BolXLXWJtsNMZTnW6Ps30cJ+XceHqrCScsdV6WB+qc7CsawX8FrOx6lYg0ASnZ8uu+BxgjrvjWVwim2ZmX57uRChFoL6suZVBZoHSxaQ+bUOkS5f3IGg8d4schKcZxBBGt4E/uduC0Cq/HaXjHcklkYo+f7yV5v4qL+pnSXJto7pQPC3c0ASkNqyJtVngxnWHE+lqOebD3DOb5BkvYBnTfGUtPLZR0gn63rfTj++HWWad9zB0qdmuHOAbS6wY5G0+FQ2HPCc4IFy9fK+TuMcM3FsV7SDH6HVtBZhPt7bOkEH/L3a1SVpwmIgi3GlLfuSwPxfmFrpmYUzgsJF/ZO8+JzGADSOB5A1jEklFDUNSj57GGykljIXvOy7xsOjcPRpGwBIOJFZJBPAvxc89VoVISF3/0eGh8UJoGTuNMd/NDuRk0wl6+ij/Q3Z4rB/YxLN4580IRGd3SymN9WxNil6zBHcSjyIBZA4OG83PvGofJnA8cpqNJC76VTMZvxMFV1JfDme8DU3QRhpk2hrrEws6ncMAJkbiHcuiNUNUQ+8MoPbdGmCq76V1SwI1Jnsh2DKrfWaA1CDYZ9mbx1x/UhUcBGLV4oo6d6RI5c/q7OMIKMIE7ZxO3LOxjOu1qtxMd/9/fTw324Y1bm1ESDlTeQfDYikA2DaE+erVyou82K2BW/Fbnn1rJs6x32xjbPeG/0YbmbbhI2fzokFWOGxjpLVE4K9xIQC2JSsw8mM+rLNJkU8CLqSHD1NIov+suia2JeiR6BpsE2/tGxfMMGvOfw+yrDvv4VQhUo3bLVpZ/xmSWXEOK0U2MNYXSl1Kawec2vtkvaCpG2AQReao5+sflop5mj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b700806d-a31e-49a7-a449-08db7d288dd0 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 07:22:13.6199 (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: h0bdRuKwOhjLCyfX31oeHOdLCHPbOV5Ez/tV8usJ7+2uk+RpwV4nIpuKs6wNgm30HMbRb3VoTEEMHPUmojyyrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6058 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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/crypto/atmel-aes.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 143d33fbb316..9692254faad9 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2566,11 +2566,9 @@ static int atmel_aes_probe(struct platform_device *pdev) crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH); - /* Get the base address */ - aes_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!aes_res) { - dev_err(dev, "no MEM resource info\n"); - err = -ENODEV; + aes_dd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &aes_res); + if (IS_ERR(aes_dd->io_base)) { + err = PTR_ERR(aes_dd->io_base); goto err_tasklet_kill; } aes_dd->phys_base = aes_res->start; @@ -2597,13 +2595,6 @@ static int atmel_aes_probe(struct platform_device *pdev) goto err_tasklet_kill; } - aes_dd->io_base = devm_ioremap_resource(&pdev->dev, aes_res); - if (IS_ERR(aes_dd->io_base)) { - dev_err(dev, "can't ioremap\n"); - err = PTR_ERR(aes_dd->io_base); - goto err_tasklet_kill; - } - err = clk_prepare(aes_dd->iclk); if (err) goto err_tasklet_kill; From patchwork Wed Jul 5 07:21:57 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: 700169 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 111C4C0015E for ; Wed, 5 Jul 2023 07:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232242AbjGEHWe (ORCPT ); Wed, 5 Jul 2023 03:22:34 -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 S232208AbjGEHWV (ORCPT ); Wed, 5 Jul 2023 03:22:21 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2124.outbound.protection.outlook.com [40.107.215.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D104197; Wed, 5 Jul 2023 00:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VuKR6QiqJQgbrQZ3RsV1TIvfwGlF8Acz8XSawRVr5KgVnwVuP35X+X8qLTMYeCtU+KqwyKucJv1gHPoUE0d2MF9yTb8ADv5BwPRBf0j/gz2HI72lds2bIKA3jyIso1fZxK/VIg6X30KppxIgY0ueW6xoz8uebSlbqtk/IBJkP0WjGJJk7dzQkndCcdcazllOeYMb4IUFcEc5oFK4fMRHWxvh6JNhWHkfWJJgdwTq8S/DU2jHuZZurBX94oBbAM/DBbGaBggDVdlLncdlcobU5a806ZloFmG9Mt4fk/ktv9vdvIwc9hK7/1qdU5lbiFeD1BLCkiGldiW4QVqGSjxLdA== 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=Ve6PEfCVBMgC0d7FAsW7OHwtkTkuLNpqmg1WfY6MVgk=; b=AihtjehuX9GmORSx6WVQOVz20cISlixL+ygIjVd5NzUPqqwIfff6q8/thw3GCf7IySZMOoXGxZipgovduBxJYvuLCZppVwRd92FeAQWhoun9xHYlS3VZbaehOOmJs4bFvpmM/UJRpJgMh6xaB0qrOYwpgcxiU6QVi9xh0XNdf7KriOI0Avbsu8c1+pczQcuAYkpq3B+OSEig3M4moIQx51/8JZOJqtfi1hJVLkttShW0HV1Sfmfoz5jFrJ3BYGlB/kmovfanQXhuCWbfkDYvsTEv5zpQ6mtdz/ZvZx3biALEDbrPTr7y6w5GTB/KuAHB22GdxhxBge7LoihYqlqz1A== 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=Ve6PEfCVBMgC0d7FAsW7OHwtkTkuLNpqmg1WfY6MVgk=; b=hwUKIc/UeTbgsOJRIDoz4CfTxe7iZLdOGmGJLlQyEWzcn/KbmuRWBj3v0k4Ua6av3jNOr9tPTC7wB/+WROOmvA6QPWqTk0KGQXzrjjxXIopRH53vvyX6trTriSR0fhQn8N6erzA76QQR52rnf0yOM9Ugv4aWPhJtK/TGUHCSE2e1yNg9o1iMlDBw/eH+Ixji8w/ec7GQS4nkCgcROzQXgJQGJhZmMlSWM0F0IAyZCkNYBIRfbQf0tpZYbQL2SoX5TToKC0XUm4u1s2DHQSIXA/FxRVvsKF2nwa8L6WK9mOd+/rWiS8DwnKZpFWJb0GBCG92oMHaxq2tNmuF4xcwr6Q== 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 SEZPR06MB6058.apcprd06.prod.outlook.com (2603:1096:101:e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 07:22: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 07:22:16 +0000 From: Yangtao Li To: Herbert Xu , "David S. Miller" , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] crypto: atmel-sha - Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 15:21:57 +0800 Message-Id: <20230705072159.77221-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705072159.77221-1-frank.li@vivo.com> References: <20230705072159.77221-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6058:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b05f1c1-359b-48ab-a50b-08db7d288f6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +hdXSrAEaU2fuw0kLbB72sm64U7sNal2Lx4yxvbHLUY9sAJ+O0Asqx/B9V9kDHYg0Q9TCp6/sRXttE1bRx2ez18Jm/byTp+IdwKcRUieU17Fu5zhz+TDkJkCEpJrXzb1MKUdTm85UJFXrW2KVViqvozgiLSP6kux0BXffYvR6w1Ydwo1X4qpUnhGbkDYupWQ5/dtD3RPi89WcLw17GXLvq+o4JfG6iC+CjZ9cq9muR6VYgU7O7VA4zpNbapu3cAJDtw6SSxobXvvKQP8Sv04tgkFPOoE/XkJ1/hYz+WBQiEps1aE626UFB6+vvUja85gZAz9M5oXM+OSbEp/tcZVnFblJCvbTBhLDRR0TzuzX3tZHb519+vtL9kqVRbz4OlqgBJYAweUVTRQD8gV2CeRfF3javqlVj9S8FQkDL7+h52+fWvFyF3lyGO/S8ihRnd9IW5Fgdq302iZHgjsEN3gtOfOGXmg9iQZpe6lXIZz3fO6pvlWA5uGhLHRwOuWKlJDC/1zqYcf9lgbj8q8NjwoD8cvrYgbP5uVaBHWHgUEkd1STaJHYzs02CXK3v67xBhEHd1iD49My+5nrQTewyH5vmF3CWF3NtH3Hrxr//5Ic3pNuMWKQBpxyrdtOv4+/T9s 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)(366004)(396003)(376002)(346002)(39860400002)(451199021)(26005)(66556008)(66946007)(36756003)(66476007)(4326008)(316002)(478600001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(38100700002)(6666004)(1076003)(186003)(6506007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6QQk8+MpYrQZSvgspUwswJDyv3yokCOsj8xZ2dImStytfPL31dwrCR+lVM+FIjV9DWeRsziUZEgRqVY0YtofWT6q7iDRE69giJbNE+ldBpaRM0phY3CQ65RHvmi3NFAKFQJF3MpTRM9FMWYq9KUPsmHqqWfGBA0PD4S6CgYlyZrLWiKvss0xIkytsTiHDDW+F3w/738zjhfoiYkLNTg0gDwWeloKIOX6Wc3+3Lgt3aydwCA2ort41iNA843vaz+PXXtk08tV6vT+53QqDnXp8ieXOgiRhEHMPfIWInDDlYtNroN5sMwqkXMvY5lzh42xiyGzpNYXHJzLrHcXu18rULE7CfiE++4eGRtE4tbJybpKC8k3kI+Q4/3WnaY5PGVrHNlh7EnrMsGz3gvj5j+eKDE3D+Bhmauyzc2voTU95tfO/0B+2jHV472WLd3jc95ffxTcEgDaSwNAPsSEZjZFTYRAM0wLQBqjoGavB5Z/cFMtAXPa8tHnewKjJGNpkzt4lnx/VHiKshlRHIt7674yL/JFlM0BZomlAnZHvBWs1vXEm24yX8vg10lNrMXakcx5wQ0gtKTQXYk4xkouIaWGm+ep4n8zYdWridYBHvSfM7tA9uMI9CACUL8i6i4Qwue8xBUbRMoDMDidq4/EikDNhZxK9+sBYuqnEFcpsaQS68lX03vIIfWl1G/UvIxXLmYWUnfMQjND01xLnP1h7wdWy8MDPaxC8pE6H/fhpO4vFeKAyOd0swYA7efzPj++8I0fdkNuwn3atVUlA2FJir1TNFH5Ruch9q/g8CHL8NTqAUNowqWyTBJ24d49vnYZc0i+4p7XwB4NIbGU08qxikYT/uzDmizpsaF6Ga6CblJazs5+hbmftKhlDLRw+xRVrXj+luqD6eb0TdlEgFLye6mV7AivzZ16JLqiDXgpLh8Oyj3TXogFFP4sAYur9QBLWKsNSWjiOh+H944sHTtIP1DR+SrSBYl5IiDw1CIUIL/mTBHXepcE7sAiYxr41IvcH4RHI+FE867emtCJLM8w8OG9subvSBURoyckSb3fJvdiEGGgvic1q10VABAWZQ1aZ/2XT4wbNycr9xB86KsUMAUUsGLj2ZLM1smp6CBmRJSB2Si4faYP7HIHNaBk48zbIUNcCgBXNNgITxP+mg2ixbsyS9Y57uxF63ZVKADB3w5MEV0KGv06j+lPL85DJRpVlAj/C2OZxXkNqhuDKb3W2a1uxPkwlAvdrpoSwumye8yaBpZecgOX+Hf7UcmQGQP9PSTYkN7uu/vguZYXP/IECVl6IO1SCudYVlX1bp+SN7lDYMvKMReGitEOu+LK0oT1Z77HR1vkOQyUgqFoY9mIGLFDl3SZ4bmtS0EV6zqRMWXv+DSHdmB+EOWWimQYZenYOqRrij8BOOTNW7RRFffw/Rq1lAA9u45l/MsKBid6PC1xIr2WXYav5fMDcyjCalBB9kPmJX02DvXi31u0D96435GYvaFWQKnhGa5jz/I7UZ0TJYoQydtr8pCYUpx04hyczt6mRgsNMyoo/a03E6m4sAu6ghjQOCKfftgv3nmoKct4Q4vCsLbrTktm1H2RJHtuyWp2 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b05f1c1-359b-48ab-a50b-08db7d288f6a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 07:22:16.3315 (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: q6JESOvWFmIAg9ySikENal33p1p9KXaTTJrLL8bjjdVN7ipHWb4UFOvTW8rN2U86IZ9nCRNOB+hbhOs4a7q1qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6058 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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/crypto/atmel-sha.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 6bef634d3c86..f2031f934be9 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2604,11 +2604,9 @@ static int atmel_sha_probe(struct platform_device *pdev) crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH); - /* Get the base address */ - sha_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!sha_res) { - dev_err(dev, "no MEM resource info\n"); - err = -ENODEV; + sha_dd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &sha_res); + if (IS_ERR(sha_dd->io_base)) { + err = PTR_ERR(sha_dd->io_base); goto err_tasklet_kill; } sha_dd->phys_base = sha_res->start; @@ -2635,13 +2633,6 @@ static int atmel_sha_probe(struct platform_device *pdev) goto err_tasklet_kill; } - sha_dd->io_base = devm_ioremap_resource(&pdev->dev, sha_res); - if (IS_ERR(sha_dd->io_base)) { - dev_err(dev, "can't ioremap\n"); - err = PTR_ERR(sha_dd->io_base); - goto err_tasklet_kill; - } - err = clk_prepare(sha_dd->iclk); if (err) goto err_tasklet_kill; From patchwork Wed Jul 5 07:21:58 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: 699314 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 09FE0C001B3 for ; Wed, 5 Jul 2023 07:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232201AbjGEHWf (ORCPT ); Wed, 5 Jul 2023 03:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232011AbjGEHWd (ORCPT ); Wed, 5 Jul 2023 03:22:33 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2124.outbound.protection.outlook.com [40.107.215.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095E910C9; Wed, 5 Jul 2023 00:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EorcQS90tSulGiO9Uc3s4048rkQ3h/gZASoVRwjvsCTB32Ry197r0Pw4IBnAZXvu+iOVtROu7WeECLMs+FQj5VvxZWqnLvgS3B73n771qkOHY55nywXYLfiz6210fl8FtvI9s5m8tmaJSjne8rK2R6UkUTVSzlT/XrvZ9KV2imU5xw7jY9o2vEZ2DOm+l413kS+FtLmSeH/wxR6fIVLTrIlnfJcMihq+CQ9VGTUWcyPdno73uo5DuKydHXN7oQOkFQ4X2MNYJs9Nz0Pi6DmScau2b2c/ANe+R0yPgyple7QehO5YDfMx5NZXvcDRyyHQBdtxQRSbUg7nbvAOr61ucg== 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=IFSVdKGS9Oy5GDAxc2bSOThrkajXBFAGXKxLogs17HU=; b=R4qcEHeF5lJ6k0ZH0bN46v89aeqaCl+3UAB0ZdfPbt9eTlECJhvukgRI5oWCS5R48JuztJHF9A/taXStTLn4vvL/YruQP2q561q9NRthUtNYmEggFsbHLM0k8kzx9w0wPT/tJW956eO40eYBNqJAEXF4eOngmUV4Z3f3xovbQpXCt1QtH7deVoPKxlwl+tS2+IaH6i3Hx6va2cuBMH2JHVbey5q2et5EFX8TiHb6ifxgGvtphWp/eSpLNZzcRqmopY8FNBb7iWKTYTpGaERTHDk7cw6lo8iPf7Maxn4k5o+7AVV2ducuGTlaXDq/kR5oSiMgEkDbp1V5yEmfyOov/g== 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=IFSVdKGS9Oy5GDAxc2bSOThrkajXBFAGXKxLogs17HU=; b=oTUcXWHiMNowaMcjVzkQO33MEM0W8c28xWLDDZpD9QAcA75aoLt3CEjaWBoCuidaW59uMbmbEOAHuD9elx/gKWYOUbzeDUTc/hsBMZnP1C5ENcaMwjJE4I6suzzpjDGf7avH99j4lqM0rg6WKx67e79rrDkgFeHgsXnQMwy24BWcVnz+D3lc0e5e8jkKkt5znaj40yh2u53rF6YgszyqAjFBxN63Fi2y/OChmo5azK0BIHQ7v5JqWIZmXMMmU7Dhv/e72aJyH5uICVP6sHLC8/2t1F/F5wHH9tcRbeYtyGAFKT5B4h7DGt4zvS5xqDGOH03+6FYsJ3wmDkDdgyBC/Q== 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 SEZPR06MB6058.apcprd06.prod.outlook.com (2603:1096:101:e3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 07:22:19 +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 07:22:19 +0000 From: Yangtao Li To: Herbert Xu , "David S. Miller" , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] crypto: atmel-tdes - Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 15:21:58 +0800 Message-Id: <20230705072159.77221-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705072159.77221-1-frank.li@vivo.com> References: <20230705072159.77221-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6058:EE_ X-MS-Office365-Filtering-Correlation-Id: 1222c6fd-9574-49ed-764f-08db7d28915a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v2ohh54AFlHy6xDpiNDZzsPbljpWO4LEmNK4uf7lpOCkpTCrSMIZoHWZZKHEfQXGKvTn7jZJWl/EbHszJRm/KDyAG3AnArYt7xOyilqzvqdOR3sWYmmBh89IlNiDgqbsgcgrgsLdvO3MRuf5p1iqYhpvI59/Pe7VnqTuNuXApD2YyRX6f43yUIdltRk4hjsWx9v5+fDzTKgaqk/hujGxKKzoXxehjrwvVk+IulxC+xRBturp1IvOoBcXVI7D6Pq1Xf2owHrlnxXVhXDgwKbxOpaaoBOfJdRl4FcqcNMRHUPf+NQvyKovvUm1fIRViqOqTCwapi/Mxb5S6Gd9OImwjofnZxgLQlPMkfoR7HM9Kjkn/YtsXQbnl+xgErFok4mSXXyIQOy23MTNXu2rmhIu0En2fowsO34z0XaXxv9T3pnXhylw2v2LASEjN5173iNCcFBBza2EsdpIg8G+vtGPNEzcQdLEuA2AchSiQiGO38B9YqzQqPsWlhDXKOykl/r75xwZ3pUJTHUtwYYWwDNtjS8SNEMy6NQSpLZ/u0hN8UfZm9DCJufwskC/K+FDBkynDHTrj69ANjgZPLRr4fT9/UsALWuhYdLWmAGO9fDguSQ/zKfcuBU88CPbvgUF9PBg 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)(366004)(396003)(376002)(346002)(39860400002)(451199021)(26005)(66556008)(66946007)(36756003)(66476007)(4326008)(316002)(478600001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(86362001)(6486002)(6512007)(110136005)(38350700002)(52116002)(38100700002)(6666004)(1076003)(186003)(6506007)(83380400001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2XLDnHYQQeVLkj3QPdItIngiH/yssmvLVRLr3+e8CV7E3sS2QqBY7eQ2nRxVqBQEbpUrcIbHwSZetDMX4cDO/Vs/HmFJ2L7IqrftLfi6n2yVAU43UwXmJ1EiOcpNGTz2+NlJNfP/C8nAB5bp6skCtBr2KAlWhP8iRxmaO70b1QJ9VxQ2fGKz5jHORJ+2YWq2aoLqKKiOd7owWII81Yz1YeVDDD2aYmgzSKK+MCVz6If5EYDT82i8JX5kXu6dQBCzqtSe3YLJX3W6NUSiMCf1VAx2PRCMqtB7TnDn9PTNMykj5JqT5NWV+ahX+TTLlexgbusFKeX271UpBxBIB0noutst+ll/rd+H5qcG3zGrTnaxcj8cBv30xzwAqvcPatEkx9jb5fZOOjNLLIRtHfa0veXfclFEyAacZwoB/lhQXLqWLkF2SjJa2MISsG7zHWDbhsrdJd+iJzr5kX7SED5dfzw7nnPtonpm8wWPJCeQ3coZOJgogRFPO5d6fYj6PxByvr7ibpM6o31X6BcE1ZjLvuldMxjDrlRnL7IYZ1YyWtyJl2i5KORAQe9JLAPPUaeWtyM3htEjLz0Q3VJa/qjfkBlCsefMGBfLvP0iNQS2YnZcbpZ69XkhNk7hLevhH+gOsCMqSkQDWHc+GDMT8RceSJaAbQuXAOWOtHqN3fiHiUHuZq+LSm/VintYwhhswhkBB+vJopcxnLd66apT7FA6onMfAkI17MiHOxM5XSq3sKlyYJlEpPpgMbfblhWIqd7d0bNawz+N/iQIRyvcjNThdpzTW/Un0d/PLJsDd+YC91qWksLw0rWJragspVsloNy412w2W4Q/vA3oUw3UeZ7O0IZlqDPqjGFnhhqsS2PFw94t1tVTu7FbcuqSUy6O/IJSzFDdD7bAwq2AzQACepbkAeJRz+zyT/v6PIM3irKXmPh+6m2GhAkpVj7bxh0d56M2+vL88rzP6Wyb6Wm5N5ksWpK6va18JHPaIRsJgFEhLLPb48xQ6RDqq+IOj8MgCXaS/JwGrDnhaRDfbGh6jsS0Vi4zy/GgXSYwLrxSUDW3RTHOhoNTwlv4pE7CibVEZfjVG7LxdfxFUhAD17FkVMALCvS9SUIgam9Dg14CNZHHk8RkNzcHusFUiNRBlqpLr5heCT2yuX2qeFPG0vf5ark78WLi4TiHQ8HCtMgVa1faD3Xy1vnUZULZb4yiGDuSCcIAg6Z8caqzaoSuGRepm8II0P+xJACS6X4PHNzakRdaWKzgB9Q0cOGbCFWtGD/fwAIpCb+Dxfi+qYEo/OA5l6WtlX62VZNU7r9kjdLjXgtsG9lReNjEXU5oBvf7H/CePwcKqCyee30sZHcnmS37bQoFYltzsOQO0pdaxl57qG+KFy6IHiTXDECdzrxVnHMoReOiQrahmL+Ui8B7sGlxZVPh8cHv8gHhLfYFyJ8WQyJNu7+oL5gkULUgHX/feFXo3Uat3VmfIUokRheLD1rT4bFbGQBeoJAOHpVgTXUnRWwTpdnJCX4Yn2oeIV2O3C6FLHJCJgVrxuMHgVaZM2H7ErccfdkU9z3c1EtXfoqfywhE0MqOKSwqQxybzyWoy7c4U573 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1222c6fd-9574-49ed-764f-08db7d28915a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 07:22:19.5581 (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: W3YkiKy+NTr5fHo7SmqijDeO82p69ZtxTFRfecS7MFSl+0n1TVePNM+y09/5vIZ/o6xbj3uTUOqCqI5ps7H7Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6058 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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/crypto/atmel-tdes.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index c9ded8be9c39..ba8981f326cf 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -1172,11 +1172,9 @@ static int atmel_tdes_probe(struct platform_device *pdev) crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH); - /* Get the base address */ - tdes_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!tdes_res) { - dev_err(dev, "no MEM resource info\n"); - err = -ENODEV; + tdes_dd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &tdes_res); + if (IS_ERR(tdes_dd->io_base)) { + err = PTR_ERR(tdes_dd->io_base); goto err_tasklet_kill; } tdes_dd->phys_base = tdes_res->start; @@ -1203,12 +1201,6 @@ static int atmel_tdes_probe(struct platform_device *pdev) goto err_tasklet_kill; } - tdes_dd->io_base = devm_ioremap_resource(&pdev->dev, tdes_res); - if (IS_ERR(tdes_dd->io_base)) { - err = PTR_ERR(tdes_dd->io_base); - goto err_tasklet_kill; - } - err = atmel_tdes_hw_version_init(tdes_dd); if (err) goto err_tasklet_kill;