Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp652489rdb; Fri, 6 Oct 2023 14:40:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFD0Kwo4QjIMeyh0aVdrIm8HQ2jhtHNsuBBFq6x7q1NjqGV97nAK3pI1jySB/I5Q3VCzoZc X-Received: by 2002:a17:902:d349:b0:1c5:e527:68b0 with SMTP id l9-20020a170902d34900b001c5e52768b0mr9343483plk.62.1696628422738; Fri, 06 Oct 2023 14:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696628422; cv=none; d=google.com; s=arc-20160816; b=FC6A6pUCBvwzdfrPaSXcD0YNOTD/JAufBtTOO3m3YhC7jZvZr4XK/7RjDAzBzLz1Dx JFJqPY2aigu0+cIpy5+69GCFuJhFr5z1e9ErsjrTJvg5IW3gfgt+89vKIG7ZcgJtzHMn ZkrDARaaq39YPll9rs2T9nZsoKlBaigruddI4cSSySN9dDsQWZxlF33W+FVz/18rz97n loKl61ZrZ69+8IeXxP9wZRIH7U9zuX5qSwG9q6sN4SqWXXq6lsMEVze4snYcswXHc+L2 VmrZAYGRgmiCiL1gWptEZixHOGd/iBmb92j/3Abo6DYWWzPEIOkHQM62H5fRPepLsq1c 8sbQ== 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:dkim-signature; bh=puUgPjYlqbGFxpP0CpZrnQBUVTMI16KDcXmGltnqKfs=; fh=2p0ghx9cC/Gt9hWn3SwzaFEZUkI3U3+VVqpC4wXATRk=; b=vn+g62WV1aIiz1z6bKGCmjzGx4TMO+Ot3m5P+SKZ4ziyefANlxKwtvb8lCBYIlXrXc JGScfnGE0e8vmwmPju0EQfHOkEj4/MVbDm2duyMKGy9KBtCEjJumLEiFeU+VqdFvo4+4 uIwyr7cHrdLqWORuZmTvxgFZAsjGVmraqiTvHbuuD3mY+sVw0YhdQT9m4fETW5+TOVa+ JYoBYtPi9mt3XO6RGowpu/QwbmQaEXkQU2uLT89P3gjndquf8odyfdM5ONrnNRhFWHxs GENmVAa5AwPBoFvVpDOscrqQb93+85EholZHZTsLhMz178cth4tVXkryA1d3v0jb/F6y DeZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WtHKJAnu; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id jy13-20020a17090342cd00b001bf20c806b0si4402769plb.175.2023.10.06.14.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:40:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WtHKJAnu; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4AA838043AC1; Fri, 6 Oct 2023 14:40:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233796AbjJFVkB (ORCPT + 99 others); Fri, 6 Oct 2023 17:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233788AbjJFVjp (ORCPT ); Fri, 6 Oct 2023 17:39:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3CC0D50; Fri, 6 Oct 2023 14:39:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FD9BC433C9; Fri, 6 Oct 2023 21:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696628368; bh=2XziYcmjBQwlHQ8WEyRONsKUONRLFG9IYWm+kWdCfdQ=; h=From:To:Cc:Subject:Date:From; b=WtHKJAnumyWwN6Ciax6SvYhzJ3vyq+rbg41/4VP1xSVJ+NxVzQTDBqaNxGZ/CHUVC F4fhrev+XNLFauaBsfhPEWAz9JxqCtVMe2QrrT6J5S0fjfpgMwdrO4mFuEZ2vvVA1r +rW+efnyEjSqtWic+5vfK3grmgwgkgh94fO2UFilHOx2FnXHX1xVIJ4feCeIohqbPy DRt4WjmxEjU4JS7mDmABQc/mioPuz38BsvFP/OxBKJZNt5jQwmOVPqlBRUspcYqfRe Nv2spYh1jdV9w0i3BOqNp9hQRfRWiprXa6QI8RgdRqtAC8hggmEW7cL5lLWkEfVjm/ 63N6yj698wwjg== Received: (nullmailer pid 333873 invoked by uid 1000); Fri, 06 Oct 2023 21:39:26 -0000 From: Rob Herring To: Neal Liu , Herbert Xu , "David S. Miller" , Joel Stanley , Andrew Jeffery Cc: linux-aspeed@lists.ozlabs.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: aspeed-hace: Use device_get_match_data() Date: Fri, 6 Oct 2023 16:39:17 -0500 Message-Id: <20231006213917.333702-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 14:40:20 -0700 (PDT) X-Spam-Level: ** Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring --- drivers/crypto/aspeed/aspeed-hace.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/aspeed/aspeed-hace.c b/drivers/crypto/aspeed/aspeed-hace.c index 8f7aab82e1d8..d9da04fb816e 100644 --- a/drivers/crypto/aspeed/aspeed-hace.c +++ b/drivers/crypto/aspeed/aspeed-hace.c @@ -12,11 +12,9 @@ #include #include #include -#include -#include -#include #include #include +#include #ifdef CONFIG_CRYPTO_DEV_ASPEED_DEBUG #define HACE_DBG(d, fmt, ...) \ @@ -101,7 +99,6 @@ static const struct of_device_id aspeed_hace_of_matches[] = { static int aspeed_hace_probe(struct platform_device *pdev) { struct aspeed_engine_crypto *crypto_engine; - const struct of_device_id *hace_dev_id; struct aspeed_engine_hash *hash_engine; struct aspeed_hace_dev *hace_dev; int rc; @@ -111,14 +108,13 @@ static int aspeed_hace_probe(struct platform_device *pdev) if (!hace_dev) return -ENOMEM; - hace_dev_id = of_match_device(aspeed_hace_of_matches, &pdev->dev); - if (!hace_dev_id) { + hace_dev->version = (uintptr_t)device_get_match_data(&pdev->dev); + if (!hace_dev->version) { dev_err(&pdev->dev, "Failed to match hace dev id\n"); return -EINVAL; } hace_dev->dev = &pdev->dev; - hace_dev->version = (unsigned long)hace_dev_id->data; hash_engine = &hace_dev->hash_engine; crypto_engine = &hace_dev->crypto_engine; -- 2.40.1