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: 115992 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1700407vqx; Wed, 5 Jul 2023 00:55:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlGblaxCeSzphPne4tBPt5nZauCPhgo/HguCbwbzorwh3B0Huiu0TZ5zOPy/xCNPH7dHgUcc X-Received: by 2002:a05:6359:59a:b0:132:7a2e:87bc with SMTP id ee26-20020a056359059a00b001327a2e87bcmr9134289rwb.5.1688543732342; Wed, 05 Jul 2023 00:55:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688543732; cv=pass; d=google.com; s=arc-20160816; b=QW42lOq8TZ9B3cCH9IKoMCNY0qsQFu3BATegaUw1cdyHRU+eO7qnSXCCoFEWvwWgQB X+cTgfmpH3gecbaWZwNFdF3TsNrbC6FBb6KyWq5kN3bytGbSV+2XfBJ7tcCBFJYrCPrf La00HUWhQwrkScr/STTf4V8EaNyx2yHGYyt9tqXPf5DovaUt3Bvz/32EmbkUeWkVYGSN La9sxZAwERTGioPqNRje8NfuI27+13x0KwoZ+Jlm+wTo1ya85dhOgpa5r+JsHkdszqsV LrQ421saWLwwb//2C3z+VtAc/ak7Y24m62HyXHk8OfbHLnn0HN8n20bE1Dy45x/HUvkv rRvw== 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=F3R5YyqcPwxpMQtiojJc1md+fTHDdQXOdD1Y5PaxsZ8=; fh=X8QIWTodosKn58h46/Hm85LIJRY+mSjFappxUNgD1uE=; b=tbNRvQl8jyLEyGTnigODeEFbv/E+z/DcZAH4SqvLcaQAlNSYpffrFWhHlPhK53N+nW gPmNYqDFOymG75s0HjyWrJ/txDy9E4KI/vH9LlvJq5oWZ/klgwPGXUecZ9kZeDHOpndk XO+tNFzR+opssyYW7YPqqBMaCJ9PV3ke3CmVa+jm0JQMpUaKEQvC3ciVBKmF17LdvycL 89d7y+LojX9GWKYZiI8beJ/wzNu7by2kkuOSgbrKYrASdolyGjAc2IZhivciv8l0zt0w cJBVLrb+NK9OPewjXEFdRJJXH1I3Z6p0OrI9NYnV5rqLpnon8SiA3lYhC6mzA+53ckN+ afRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HeaySCT2; 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 k5-20020a634b45000000b005533ed46a70si22600437pgl.814.2023.07.05.00.55.17; Wed, 05 Jul 2023 00:55:32 -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=HeaySCT2; 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 S232221AbjGEHWW (ORCPT + 99 others); Wed, 5 Jul 2023 03:22:22 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770566432575717390?= X-GMAIL-MSGID: =?utf-8?q?1770566432575717390?= 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: 115982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1692577vqx; Wed, 5 Jul 2023 00:34:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEwd6eqeDcjvarYt8Mhnaram2FSD6bEY6snIFt7oeJRIJjU6wV43GZVsqcW+Pvqu75m721z X-Received: by 2002:a17:90b:1bc4:b0:262:e697:f367 with SMTP id oa4-20020a17090b1bc400b00262e697f367mr2083164pjb.15.1688542440978; Wed, 05 Jul 2023 00:34:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688542440; cv=pass; d=google.com; s=arc-20160816; b=jVlsIr27LqRJAJl1FibdWChV5YCwMyjk3daan0u35lBbLpCGKM3FZPS4Hbfa8+/OTY CFJhkByuSA2itMhZ9M55uTtIeuk881c9Cpn7ApMMOOTf65bH+gtTECn3KFU17/b1ZRB7 MD3tXaJ1ssMmkuNYZo2C3H2LgTH2wlECWfq3nDqZirYSCJUEgCmS/FNuPRuNIk/wt9+5 hs8AIhzTkQOebeXWk+nbgPVN3XDyozUEJcSVythQb2HrArMZC2H+Dy/aYlP3jwEA/Xmy qHdoOhav45rCK28+K5fSReuZJJyoGuoAcyrI6bQ6Q51ZBR3ch+4OMuRa6KT78vIvf0Fw FEnQ== 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=Ni4NMIq9gwaRLZlMszJncfYmUddIMbEeqAHECI08eto=; fh=VJIGgBLbBsmW2TxbIJPizn5263tcz1+EGMapcD2wYOk=; b=waIjq45POTuAfzCJsDF8MZDaFnXAKcmq2+I4+fhasYy3Ksq2FHhCNOfo67TBE/CBYi nxqFHgDiTiHXUBwBDBAJFRs17PG/JiLLKM8AoW9YF0/3okgQJaymSqZMlenBoO4Z8uUJ wwD4T4EvVkrR1fN/VG7ROB2xu4lhKnUQf4UXIHK5b8zaFTftPrIfiBS/hzJ6nZsVEtjs pxOjsWtUt/L2cNd7AyfUPU1MpLPAt2fHIPhpOR7UMDo1LZCdiKmaDo3rFfLfShXdXY9O olXxxecvFAAxi3nVA9t7nLeod0P1IYPprKjyB9GFMX0MjiSknMe5DHbqAEhSi8V3OpTU 9XRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OW4V7Vou; 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 l184-20020a6388c1000000b0054481da6ee5si22279679pgd.418.2023.07.05.00.33.47; Wed, 05 Jul 2023 00:34:00 -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=OW4V7Vou; 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 S231989AbjGEHWS (ORCPT + 99 others); Wed, 5 Jul 2023 03:22:18 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770565079055930277?= X-GMAIL-MSGID: =?utf-8?q?1770565079055930277?= 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: 115993 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1700690vqx; Wed, 5 Jul 2023 00:56:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlH02DvCpL6r1gil7m5dAYPRIgyeVgkV5s6E9wSkwgag26k3wIymQGIu6z/V3QUIZIGQjKF2 X-Received: by 2002:a17:90a:cc02:b0:262:db8a:318a with SMTP id b2-20020a17090acc0200b00262db8a318amr15115549pju.30.1688543780074; Wed, 05 Jul 2023 00:56:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688543780; cv=pass; d=google.com; s=arc-20160816; b=RNUDzEbSr+67zhhuGKErc4K1PvJtU3lJMQcD9er0qa6bfPfD8UFtZB6Le96mkhvbyf p/mPNVAjkH3xW6THoXrbuF20By/9IfC1MB1FEKiooaGKKuf2bofMmzJTL9Z63yFUedyK 4d96RctGjiIzJvTUcOHu0PIx8LSUkRKXG1UiiG/qjSAwB9gtEfa3aBVLCH9FMBIuzzUp U6j52IT9d2CjrochVN0bi066s93e+Xh4cOhfi+GMfhVtbBuA1GcdSMRuhVXTPVfnN+KL U1AH2MjGo4t3iv584+23dq3kb6H0MN25E5bUzVetLzsI8300EPQGCidzrYxJZOUR11Z2 1xhQ== 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=Yqm/4YpIpfV9oXyYVoPj7Fyn6Qwqk7SYVjwSZlxxkIQ=; fh=DjBQwjdXFQMld5wYnCntyldqnfvs2/ny7t65cMQam3Y=; b=BDjBKpHRd6dph2hAV9HHSdm+N8pc7kYQj7ho1Dztq+AjY30Q+VCNDm8y93gdZ10M1K MDsj4YAXXLTwjH0cVu1MfZQ/4v9luIIzvTcAD2L3Smk9is5O6gxMmeqsLlpGEehRInwb l5CmkFss+CxggzQiPzgzy7SsjtMAYvM4lBnuFJXoAFUpk8kxZc90vPqFgPqGmUEO0XVR ad5Qbp4+qznmoGraqZKqDvGTvH002u5pXUu+OmH3lo91N8OvUdlpG+dc2MCkvmX3Wv1d P9PvkSLar6bJBT4q94i6WVf8CUZyrbC6ZfW5O0YoYg9mHrFdbcnOxrMVgqRCcdZsoTBb WbbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="qXgy/n4g"; 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 206-20020a6302d7000000b0055badd6d2d4si6192878pgc.414.2023.07.05.00.56.07; Wed, 05 Jul 2023 00:56:20 -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="qXgy/n4g"; 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 S231708AbjGEHWZ (ORCPT + 99 others); Wed, 5 Jul 2023 03:22:25 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770566482839578642?= X-GMAIL-MSGID: =?utf-8?q?1770566482839578642?= 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: 116006 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1710198vqx; Wed, 5 Jul 2023 01:17:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJVDrzf6CuN5NAiqJMvQ1x4015OLYuJ98ocrjt11BaPbQn9OmkAWG4OzMjMNTzWwRp8QTX X-Received: by 2002:a05:6a00:1742:b0:67c:c8e4:8689 with SMTP id j2-20020a056a00174200b0067cc8e48689mr12563420pfc.12.1688545074537; Wed, 05 Jul 2023 01:17:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688545074; cv=pass; d=google.com; s=arc-20160816; b=Y8OqzECn3ZbTmJ1s1fiFbpEsScj2pXRoz3eolhik0fN2KJM69CMcPDLwTk8nLRNjHd f4ZsNZ2YRx3AjpCtXILsN6a1latUNi1ALu6K3ryY2WuqvfKzuvT/HRtw7OHZEulGmzbC SY3GVxo0bmWR1Eaj/Qq0ZMYTGLc2PXzealHzKA6+ZvBg2iA868pgdDnlCbQcdpKNSe9N 8Lqyn5MtW3dNGCeFKziVU0WGZM1kGQEAASuG9adn+LaGCxWboC+2wUBgbMk7+Oy96iXd aROD+EopVnYMxA96dzElGzwMdqMNo/e6ygd2npyM/vO4VGkRpjQZEtUFxgDUhQPxjxj9 YICw== 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=Ve6PEfCVBMgC0d7FAsW7OHwtkTkuLNpqmg1WfY6MVgk=; fh=DjBQwjdXFQMld5wYnCntyldqnfvs2/ny7t65cMQam3Y=; b=E31LvRYdxXeqBau2NE25VKo7FMUPowkPOlrgT5bJPRB1N7XISSUB05a+TtWzq6Enkx dR9Vqn8VsnutMLLFdHxM0lleC+s/sxyO24aVqnmiAYZeARiTKjIeyugm7Yn3nhMdZ0ZM t0+niFWj+C0bV/oT2wiARqMLcjzYBYm/NEvnJHWa+rYkNBoAfrQIXXmpTLQ+sKr7u4hQ uojHkz50z+Pu9WmXaaIo3WYmDFOa9iF3ay2RaATTQkTw6GHQhvd5y0IYf2xfdLUNe6E8 DTfwswa83liRpfDwvYWD7H6pCHq7s039h9dqSMYWmS7n0emvm6SvihY7GEyAHyDsJCrx N/FQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="hwUKIc/U"; 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 ct26-20020a056a000f9a00b00678243b2774si19093136pfb.78.2023.07.05.01.17.41; Wed, 05 Jul 2023 01:17:54 -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="hwUKIc/U"; 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 S229697AbjGEHWg (ORCPT + 99 others); Wed, 5 Jul 2023 03:22:36 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770567839835292032?= X-GMAIL-MSGID: =?utf-8?q?1770567839835292032?= 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: 115999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1703354vqx; Wed, 5 Jul 2023 01:02:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlGUd7zfIPGqpIvUORpG9Fg6PVViIGWrOGbPItL+8kNmi3h1lQj5OtRbJsOYawKhiTpkl0nr X-Received: by 2002:a17:90a:9487:b0:262:ecd9:ed09 with SMTP id s7-20020a17090a948700b00262ecd9ed09mr11448820pjo.33.1688544119835; Wed, 05 Jul 2023 01:01:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688544119; cv=pass; d=google.com; s=arc-20160816; b=y65xf8zTNX+sVuDgMU2Yc3T6ZTL96w4POVEJZe+lLcIuWtQ1F4jzPw+ZPQv9tOJW/H 4fN1EVGvIfh20jHhXkryp/Cf6vbKgHHqFgKzEkaik8Wx+pGkUFW+kzygW2cXCeM6K+3V I6JaJ5dVWO8SmcnDz5k+/Elq/Fjz1O5ZvqEjckMRnBf8PEm5ajuOHC5sbbEpxXvQN2Mv T+/JBNsL5BYEWDnvx+NllBhrb7hqXC+B6i8uWGjWd3NCqZMFb4EdNfJJGBkdX0IQBaTd v+iX7qDSYQs6ftxn7WU3BohxzPSvuC+VmSrKQbP0mn/hofRfwj2WdHW+pB8eBEdh25R+ qmyg== 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=IFSVdKGS9Oy5GDAxc2bSOThrkajXBFAGXKxLogs17HU=; fh=DjBQwjdXFQMld5wYnCntyldqnfvs2/ny7t65cMQam3Y=; b=uPHxI0axUJYUd/bcSAeAzRCHcOF+WguPQtJQQjkMj0tai/5p9KSIVtn7ZwdrI+jR1F 9Pd42V2IgPGnekJ8dv79ap0VhuRKkW8y4uKlTQBel3vi1S4xrXzPuV8u9zeWHhhiFH3+ AZaCxok5z6oHyrQMNtFF/5Fs2vHmRYiQN/0Oj0ufiGR1AvJJK+BVScBdV13WCLRXv7s8 iCC0PXROlHz8RKPzEENL2syelg8ld7qh9q2E552ESJqRJ5GBMPc2frI7yIVjD0EPM08d TKEHD+9vcT03q+gz4oo3RoIO/bcMiFybuY8hoN6M3X4vWy/p0SzY7u4VWN5nrnZ2TW+g dg9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=oTUcXWHi; 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 a4-20020a17090a854400b0025027e0ad3dsi1159818pjw.81.2023.07.05.01.01.46; Wed, 05 Jul 2023 01:01:59 -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=oTUcXWHi; 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 S232237AbjGEHWi (ORCPT + 99 others); Wed, 5 Jul 2023 03:22:38 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770566839034037792?= X-GMAIL-MSGID: =?utf-8?q?1770566839034037792?= 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;