Message ID | 20230705072159.77221-4-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;tebrre53rla2o@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <frank.li@vivo.com> To: Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Yangtao Li <frank.li@vivo.com>, 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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+53QqDnXp8ieXOgiRhEHMPfIWInDDlYtNroN5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imQYZenYOqRrij8BOOTNW7RRFffw/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: <linux-kernel.vger.kernel.org> 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?= |
Series |
[1/5] crypto: omap-des - Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 5, 2023, 7:21 a.m. UTC
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 <frank.li@vivo.com>
---
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;