Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2634859lqp; Mon, 25 Mar 2024 05:14:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMQCq7YrwLjJ/Nf6Ms0WEA05l+uXGiqCPSEUNf/gBlbvRCNP2RcXGsmMvQ1J7NJZxwP4MQ/KXEOwfDu3nafBGQgcxSPCI9FfltFMTRpQ== X-Google-Smtp-Source: AGHT+IHnkXJHghIxQG1w3WSDdAUNWy6yGNH+o0m2zGRikEmf4UiJeR9rq1rNkCFNSRmOWbLndcjC X-Received: by 2002:a17:90a:86c1:b0:2a0:4c56:8425 with SMTP id y1-20020a17090a86c100b002a04c568425mr8654291pjv.8.1711368860683; Mon, 25 Mar 2024 05:14:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711368860; cv=pass; d=google.com; s=arc-20160816; b=hQ12QyvDEc8vNV6xT+/yi3WArwH3qoTOPbLnFay8TR/zWl0ZNyjbRnNnPKnSQ6KzUq B2AhA9oGB5NIcMGD5ZK/2PU9oUj36GdBYKSISkWMNqjK7qDwfWHa8Q61QiPtxIq5yZv3 oH4AwcKXzEl3FBiB2WE3I5+pHXSA2QcrQYmZC8G5w48TZo5XblFjm+Q2rqWTEoT4XddM 6tjZ9wmyNOYRJrTWftsUoNt3Y+7ptEiHRiiDv5AZ/4eHmChdFJgTuO5/UTUJoxb62VQ7 KUwbW3ki42Nd3R8vRmzsjiHW/+3ErCE3fXTNfQJaBqFVxp6gKPTMsozuTSSXGra7eQ6v AUww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mqz2/Fq/Nj/7aqNTjUXCkfiuHfVn28WGS1W4D4SwleM=; fh=S2wzJMZit5aAScyK/B9/ioODdovtrAie8i6pw7NQJbU=; b=VD0DceggWU+veRB2E4a+0a8l4D+0DmsnDMauG9LkB/BDbDtYdGSHDKoNo2xRsMmE8c mJBYujPCTbMYsscpZaAXKaQ6mZ4BsrOgHF7Tb2dQ7d3iopvHLYUpMhBvIxZksSJGYWo/ v0UE+9XCA9pRjCu0dcor+AJn2DMQuKoyMx5l7hG7QhHnPycKg5UbavrG5fcME+ZDIMcG InWlnuLwNYw2+9wbDrod1ugMGQRtg54OFqqDfIseQQuswNG7eS94+3RqmtYvn3hqhbxQ z0DyuTvEPGHdC1dx7dsgrfoSJ+YaPxjzWge8NWdU/tzCk26FiZRQkc2MkEGiQsreKP3Q RBsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sPi/vjOW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b2-20020a17090a100200b0029c5e28d936si7667190pja.146.2024.03.25.05.14.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 05:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sPi/vjOW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116337-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8F092C39DD for ; Mon, 25 Mar 2024 12:07:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02A9B1869CD; Mon, 25 Mar 2024 03:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sPi/vjOW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 350F5184F0A; Sun, 24 Mar 2024 23:52:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324340; cv=none; b=pZH4+WDsoktXrHoPoN/jtlJl/DYOdzyWPZ+3Rd9aNnD2TSk5ptbEqDqkCx6swUUBDFdWhbagKToJvjg3bjyFhYHr9O6/XkBvmGDkJt9GsY3VMA2J74972g7v0ZOOMHgkrpFHwQXUhYn26QQnvjqTw3TfLaYVwmS8V4jtHtUIhfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324340; c=relaxed/simple; bh=5bMpDei5pQBV7TFItVqG+PgNFyz4lHjg/J19IK10tro=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L9o6FW4yUOlJbz5/R8bDL5aazHjuKIABpjuz6HiwKVcBdFoUsdVyVfdKqid+qwY1Yu0pHRFmVFT2zN3uj1vQzFJR3jvJZd4lRLKEkPiP4jlIuI/SliFAwjtRz0W5uvpvplLdAu2PHx4jRnw+msnuvhma1koiQ37x26QzOeVO4iQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sPi/vjOW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76538C433C7; Sun, 24 Mar 2024 23:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324340; bh=5bMpDei5pQBV7TFItVqG+PgNFyz4lHjg/J19IK10tro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sPi/vjOWoDdkz8HlmaIZrC3Zg9MG0POta1VI8MFT4IMwgAcrGrS1umb3LDw6bNw2O JzHV4mDqWpeFbP+MPtgUtbjyEAEbLE01dQ3EtrnuwkW3+i/87H4KHE+nlrtyO032LX +RVEu18AJ7pfngedLQzlwEOhTOOqzSZPSv0o5nuGIS/K09uxQhpoj41TQvbrjRTR6e l6QuYm8WgpZQkcKa0nNC2Rzh+M6Fo6pcRwsEVzXE/ecq7tE/ZxEX4UY9n6/liH5PDX s5dMV4yL+ReF1+UT+fBJKmvqb6n+3VUl6F/mJggw2J2dfmLAJvKxcbRy1/CWfJfhR3 f/xXgdG4U8dbg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Herbert Xu , Sasha Levin Subject: [PATCH 4.19 110/148] crypto: arm - Rename functions to avoid conflict with crypto/sha256.h Date: Sun, 24 Mar 2024 19:49:34 -0400 Message-ID: <20240324235012.1356413-111-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324235012.1356413-1-sashal@kernel.org> References: <20240324235012.1356413-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Hans de Goede [ Upstream commit e4dcc1be15268b6d34de3968f906577591521bd5 ] Rename static / file-local functions so that they do not conflict with the functions declared in crypto/sha256.h. This is a preparation patch for folding crypto/sha256.h into crypto/sha.h. Signed-off-by: Hans de Goede Signed-off-by: Herbert Xu Stable-dep-of: 53cc9baeb9bc ("crypto: arm/sha - fix function cast warnings") Signed-off-by: Sasha Levin --- arch/arm/crypto/sha256_glue.c | 8 ++++---- arch/arm/crypto/sha256_neon_glue.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/arm/crypto/sha256_glue.c b/arch/arm/crypto/sha256_glue.c index 0ae900e778f3b..040c744ef9f50 100644 --- a/arch/arm/crypto/sha256_glue.c +++ b/arch/arm/crypto/sha256_glue.c @@ -44,7 +44,7 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data, } EXPORT_SYMBOL(crypto_sha256_arm_update); -static int sha256_final(struct shash_desc *desc, u8 *out) +static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out) { sha256_base_do_finalize(desc, (sha256_block_fn *)sha256_block_data_order); @@ -56,7 +56,7 @@ int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data, { sha256_base_do_update(desc, data, len, (sha256_block_fn *)sha256_block_data_order); - return sha256_final(desc, out); + return crypto_sha256_arm_final(desc, out); } EXPORT_SYMBOL(crypto_sha256_arm_finup); @@ -64,7 +64,7 @@ static struct shash_alg algs[] = { { .digestsize = SHA256_DIGEST_SIZE, .init = sha256_base_init, .update = crypto_sha256_arm_update, - .final = sha256_final, + .final = crypto_sha256_arm_final, .finup = crypto_sha256_arm_finup, .descsize = sizeof(struct sha256_state), .base = { @@ -78,7 +78,7 @@ static struct shash_alg algs[] = { { .digestsize = SHA224_DIGEST_SIZE, .init = sha224_base_init, .update = crypto_sha256_arm_update, - .final = sha256_final, + .final = crypto_sha256_arm_final, .finup = crypto_sha256_arm_finup, .descsize = sizeof(struct sha256_state), .base = { diff --git a/arch/arm/crypto/sha256_neon_glue.c b/arch/arm/crypto/sha256_neon_glue.c index 1d82c6cd31a41..8d296529c8ba7 100644 --- a/arch/arm/crypto/sha256_neon_glue.c +++ b/arch/arm/crypto/sha256_neon_glue.c @@ -29,8 +29,8 @@ asmlinkage void sha256_block_data_order_neon(u32 *digest, const void *data, unsigned int num_blks); -static int sha256_update(struct shash_desc *desc, const u8 *data, - unsigned int len) +static int crypto_sha256_neon_update(struct shash_desc *desc, const u8 *data, + unsigned int len) { struct sha256_state *sctx = shash_desc_ctx(desc); @@ -46,8 +46,8 @@ static int sha256_update(struct shash_desc *desc, const u8 *data, return 0; } -static int sha256_finup(struct shash_desc *desc, const u8 *data, - unsigned int len, u8 *out) +static int crypto_sha256_neon_finup(struct shash_desc *desc, const u8 *data, + unsigned int len, u8 *out) { if (!may_use_simd()) return crypto_sha256_arm_finup(desc, data, len, out); @@ -63,17 +63,17 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data, return sha256_base_finish(desc, out); } -static int sha256_final(struct shash_desc *desc, u8 *out) +static int crypto_sha256_neon_final(struct shash_desc *desc, u8 *out) { - return sha256_finup(desc, NULL, 0, out); + return crypto_sha256_neon_finup(desc, NULL, 0, out); } struct shash_alg sha256_neon_algs[] = { { .digestsize = SHA256_DIGEST_SIZE, .init = sha256_base_init, - .update = sha256_update, - .final = sha256_final, - .finup = sha256_finup, + .update = crypto_sha256_neon_update, + .final = crypto_sha256_neon_final, + .finup = crypto_sha256_neon_finup, .descsize = sizeof(struct sha256_state), .base = { .cra_name = "sha256", @@ -85,9 +85,9 @@ struct shash_alg sha256_neon_algs[] = { { }, { .digestsize = SHA224_DIGEST_SIZE, .init = sha224_base_init, - .update = sha256_update, - .final = sha256_final, - .finup = sha256_finup, + .update = crypto_sha256_neon_update, + .final = crypto_sha256_neon_final, + .finup = crypto_sha256_neon_finup, .descsize = sizeof(struct sha256_state), .base = { .cra_name = "sha224", -- 2.43.0