From patchwork Wed May 3 06:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 13229506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29F33C7EE22 for ; Wed, 3 May 2023 06:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbjECGEN (ORCPT ); Wed, 3 May 2023 02:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjECGEK (ORCPT ); Wed, 3 May 2023 02:04:10 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662D13C3B for ; Tue, 2 May 2023 23:04:09 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2236F222BF for ; Wed, 3 May 2023 06:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1683093848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=njVf6CuNx/OcP3M1JFeRjib7Xyq98oey27rlZ5u/HoE=; b=mtbDvljWf873NO+Gud23b3kRsuqEwOrN6MZFVHp5Ip/dYMxwfzGzZQX/Ug0bDOJsiW6X5H M299hOiYVzhvVKJ+Dl+O01SBofyTf4JTDehYUlYMLVoPlzrNer4KmM9OnN0vKVCnnQgO7b HBAdxvc5xcC2D6zXPa0VikMcujyMWzk= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 67DC013584 for ; Wed, 3 May 2023 06:04:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8DtpC1f5UWSTJAAAMHmgww (envelope-from ) for ; Wed, 03 May 2023 06:04:07 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH v2 5/7] btrfs-progs: crypto/sha: declare the x86 optimized implementation Date: Wed, 3 May 2023 14:03:41 +0800 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The optimized implementation sha256_process_x86() is not declared anywhere, this can be caught by -Wmissing-prototypes option. Just declare it properly in sha.h. Signed-off-by: Qu Wenruo --- crypto/sha.h | 3 +++ crypto/sha256-x86.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/crypto/sha.h b/crypto/sha.h index e65418ccd0d3..ea387c212dc6 100644 --- a/crypto/sha.h +++ b/crypto/sha.h @@ -211,4 +211,7 @@ extern int hmacResult(HMACContext *context, void sha256_init_accel(void); +/* Export for optimized version to silent -Wmissing-prototypes. */ +void sha256_process_x86(uint32_t state[8], const uint8_t data[], uint32_t length); + #endif /* _SHA_H_ */ diff --git a/crypto/sha256-x86.c b/crypto/sha256-x86.c index 602c53cf4f60..57be3f0db38f 100644 --- a/crypto/sha256-x86.c +++ b/crypto/sha256-x86.c @@ -13,6 +13,8 @@ # include #endif +#include "sha.h" + /* Process multiple blocks. The caller is responsible for setting the initial */ /* state, and the caller is responsible for padding the final block. */ void sha256_process_x86(uint32_t state[8], const uint8_t data[], uint32_t length)