Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp176229rbb; Fri, 23 Feb 2024 16:50:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXL+0ZVxTKeF+j5klE8DKNTkjYO6PjmwKLxR94OkfZg1AzrfPNKWa8M3c97ECKoVuPQaw3mZ3HGYuGQFm7UMNdhTGS4581RTSCny+2uA== X-Google-Smtp-Source: AGHT+IHGrcq2YukZS7u7Zpf355qP0PaXF5bTqEa8YNLTlp4e42iof8M8h4xPewxYusXW+nwRPQC1 X-Received: by 2002:a05:6a00:9a8:b0:6e4:890a:7af with SMTP id u40-20020a056a0009a800b006e4890a07afmr1810583pfg.26.1708735840167; Fri, 23 Feb 2024 16:50:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708735840; cv=pass; d=google.com; s=arc-20160816; b=tKkyDFSSctbMm5yrLZCzTwGAJf05qsmLDWT2wEA44/ekfKHZWyKb1BOUuYPxROGHiq Dx7ckvCjRzoMWm39WUtui1r4B0hBuQ43UJEeC5HBkpkVjuRcBaEBqdgPfVsIkgjAJIMT B/cpn+um6foJQkgS8bx7/GATFYZ5mk1IJa1XENbQuLYiKrLomVFPxJALhooVPfHJE4XO P/Tyr+iH7jyvy0TJk3Vlgc6WOc6/gnnZbwgb9ylPQc+z9F/wB9I4Tq+MtsTe2pcLoNqE JlAtQfO9Bt4Z8Lvy17dEL0ZLFVhL70wKeVq8maMhw19yPyFC1zmPRTbHS9feABo3/hBv cmKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=fnwwxSykiP6TKuXr/98S+cn740XxtRxech0zh1yU9y0=; fh=WJGm7XmVrZ4tktKZe9EolOj40usxg/Jn1SPHcXQ6HAc=; b=ZsXkKwgXdfgbQIN2VgcH9ZtvLZpK2ncRTKP9SqsaCbUIrddD4UJs5uLV4O/KqHYvfd 8/z+RqNlqj7J+EyrlbsAC9sT04yIyyxPQPXFj3WMavunAKvYc0RJ/CHVa6gXRBcPEczO vN1MPQTaMPjr12hyqUtm/xyOZ+hZYnP5IKye3b8FrzZaq8l05q6d5vNElyaepjZND1hT K3NdEX+TAfLA6Mgg4EuiST7LQFtX0WJzRje/suqWyWB1FNYHT9O06wVeEnGacNgct79I qtY75ubZg4xwha3rH9wlm3SFElwlkaq/KX31XTyxGZ8nkiAycWYyLp+I76fnU4ZBX51K Wq3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-2296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g1-20020a635641000000b005d8e3645dcesi125682pgm.210.2024.02.23.16.50.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 16:50:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au dmarc=pass fromdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-crypto+bounces-2296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=QUARANTINE dis=NONE) header.from=apana.org.au 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A00DB2159B for ; Sat, 24 Feb 2024 00:50:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACBEC17C9; Sat, 24 Feb 2024 00:50:21 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (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 20CB1138A; Sat, 24 Feb 2024 00:50:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708735821; cv=none; b=gd2DIRIWFAfccX/srFjTERMpuM3juCR0t5r6/fT+ZGlXmL7FiLS0AmjZIUyTbkTuikNfbQWYdALBKVlKZpFvOnTVjaM/4DbgOkFt9nbNI3hMKa5Aom6EN43ZKaPD5YeevxlvezwAzKNsXQBXCXmf4t3RwesVZkhLmNfm8G5jmAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708735821; c=relaxed/simple; bh=OURXWeTGQgQ2HAg6ncbqMkI52asahTJjjBDFRcVHSJQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bkUAI1w6aiABy0DqDkWqrX4ANCYsMtGxXRDu9B5VrcSSzgOOOnyVivhXRVU/b5G5uhcfK49/9Pv5D8pcQCU6kmDLXo8ZWPmcqQKaamwuJRUlC4VnMeEcxkEnL8dDp5opD+qRJcljMoWbHNa+f5C+2d4ApEyCzVfBZWyK1jggOWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rdgEX-00HDv3-Uo; Sat, 24 Feb 2024 08:49:43 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sat, 24 Feb 2024 08:49:56 +0800 Date: Sat, 24 Feb 2024 08:49:56 +0800 From: Herbert Xu To: Arnd Bergmann Cc: Arnd Bergmann , "David S. Miller" , Russell King , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Ard Biesheuvel , Jussi Kivilinna , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] [v2] ARM: crypto: fix function cast warnings Message-ID: References: <20240213135000.3400052-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240213135000.3400052-1-arnd@kernel.org> On Tue, Feb 13, 2024 at 02:49:46PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > clang-16 warns about casting between incompatible function types: > > arch/arm/crypto/sha256_glue.c:37:5: error: cast from 'void (*)(u32 *, const void *, unsigned int)' (aka 'void (*)(unsigned int *, const void *, unsigned int)') to 'sha256_block_fn *' (aka 'void (*)(struct sha256_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] > 37 | (sha256_block_fn *)sha256_block_data_order); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/arm/crypto/sha512-glue.c:34:3: error: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] > 34 | (sha512_block_fn *)sha512_block_data_order); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Fix the prototypes for the assembler functions to match the typedef. > The code already relies on the digest being the first part of the > state structure, so there is no change in behavior. > > Fixes: c80ae7ca3726 ("crypto: arm/sha512 - accelerated SHA-512 using ARM generic ASM and NEON") > Fixes: b59e2ae3690c ("crypto: arm/sha256 - move SHA-224/256 ASM/NEON implementation to base layer") > Signed-off-by: Arnd Bergmann > --- > v2: rewrite change as suggested by Herbert Xu. > --- > arch/arm/crypto/sha256_glue.c | 13 +++++-------- > arch/arm/crypto/sha512-glue.c | 12 +++++------- > 2 files changed, 10 insertions(+), 15 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt