From patchwork Tue Mar 14 06:32:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 69328 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1598632wrd; Mon, 13 Mar 2023 23:43:33 -0700 (PDT) X-Google-Smtp-Source: AK7set9UQyN7iTFn2cpFHthqZL1o6m04IqObna3kn/wKgT0zC8peTFJ1RzGDjV2pxPTs9B3uORWB X-Received: by 2002:a17:902:bd41:b0:19c:f096:bbef with SMTP id b1-20020a170902bd4100b0019cf096bbefmr12867180plx.49.1678776213626; Mon, 13 Mar 2023 23:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678776213; cv=none; d=google.com; s=arc-20160816; b=Dz8Jzs2Iq5YF1aiwkj9CWM38eB0fbDB10WWwe6Slx5DWIuojczSNzY4dd+UTuflfjG 93KIIXCynlwzTE0qxf2y20nOFLhLzUKmpAdx75YP4AxsAOWLtuXMHGvPE0QybaW5TGcN uLW08SuwOooAnfMdyYBqNmj9Iv3orNMHhXO6/qY85i0tLM6gFevxcj3WclE7qfe+mpfB nME2UkKb5vEi13uDr3SxjoRdBaqgeOpoOZ3h9GG/btQK/X6365dgmAqpcuX4R3ovTiwA J7n2UMVyqLQ5mXBK5UqdwlTBS8yjZnrsJMjUyYEIQkW51G9vHRyqko7U44DDbYfOEzbk E+Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tMpv7d8dWlkG+c9TD7zEqIxZlqWIC3dUVL+o0P22PXQ=; b=cj7nE70ikA7fehGnw8ceWbYiPN5r2H4Cj1fxnu/NtagolyyfTCRQiysMYotBVIrBVf VZfPTljq/pN14DXZnSS5dAq9VcuOUwiHumva0gxnzEeKL0lSgdRFhHHKJQB0TVBe+L7w BCYNsqegJCqVxZ6zVkl18wLzJZj5U6dweD3zTv7GsBq8atn6m9TZWPAjdNR6zwi++y3j tGhElcRkSwd9sVURVkg2PDh26eRLWday2GGMNontRHEpYlFpZ9hNE9V5Js1eKIyToeiS Pf1bIYtwzF0h3ZiuOQBZ+PgKsf2i9rUMbA0mIGDJbk9YAFogFt3NDfLmeQTJlOOl0HDZ JcJg== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902b10a00b0019c3ce4889fsi1696511plr.235.2023.03.13.23.43.20; Mon, 13 Mar 2023 23:43:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbjCNGcZ (ORCPT + 99 others); Tue, 14 Mar 2023 02:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjCNGcX (ORCPT ); Tue, 14 Mar 2023 02:32:23 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D91C98F525; Mon, 13 Mar 2023 23:32:21 -0700 (PDT) Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VdqyGsC_1678775538) by smtp.aliyun-inc.com; Tue, 14 Mar 2023 14:32:18 +0800 From: Yang Li To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-crypto@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] crypto: stm32-hash - Use devm_platform_get_and_ioremap_resource() Date: Tue, 14 Mar 2023 14:32:16 +0800 Message-Id: <20230314063216.21470-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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?1760324446938257864?= X-GMAIL-MSGID: =?utf-8?q?1760324446938257864?= According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), 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: Yang Li --- drivers/crypto/stm32/stm32-hash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 7bf805563ac2..1422d609824b 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -1616,8 +1616,7 @@ static int stm32_hash_probe(struct platform_device *pdev) if (!hdev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdev->io_base = devm_ioremap_resource(dev, res); + hdev->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(hdev->io_base)) return PTR_ERR(hdev->io_base);