public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: kernel test robot <lkp@intel.com>
Cc: Robert Elliott <elliott@hpe.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: Re: arch/arm/crypto/sha1_glue.c:34:8: warning: cast from 'void (*)(u32 *, const unsigned char *, unsigned int)' (aka 'void (*)(unsigned int *, const unsigned char *, unsigned int)') to 'sha1_block_fn *' (aka 'void (*)(struct sha1_state *, const unsigned char ...
Date: Thu, 8 Dec 2022 12:58:50 +0800	[thread overview]
Message-ID: <Y5FvChDBD/+uaFy8@gondor.apana.org.au> (raw)
In-Reply-To: <202211041904.f9S5gAGL-lkp@intel.com>

On Fri, Nov 04, 2022 at 07:33:43PM +0800, kernel test robot wrote:
>
> vim +34 arch/arm/crypto/sha1_glue.c
> 
> f0be44f4fb1fae David McCullough 2012-09-07  23  
> 1f8673d31a999e Jussi Kivilinna  2014-07-29  24  asmlinkage void sha1_block_data_order(u32 *digest,
> f0be44f4fb1fae David McCullough 2012-09-07  25  		const unsigned char *data, unsigned int rounds);
> f0be44f4fb1fae David McCullough 2012-09-07  26  
> 604682551aa511 Jussi Kivilinna  2014-07-29  27  int sha1_update_arm(struct shash_desc *desc, const u8 *data,
> f0be44f4fb1fae David McCullough 2012-09-07  28  		    unsigned int len)
> f0be44f4fb1fae David McCullough 2012-09-07  29  {
> 90451d6bdb787e Ard Biesheuvel   2015-04-09  30  	/* make sure casting to sha1_block_fn() is safe */
> 90451d6bdb787e Ard Biesheuvel   2015-04-09  31  	BUILD_BUG_ON(offsetof(struct sha1_state, state) != 0);
> f0be44f4fb1fae David McCullough 2012-09-07  32  
> 90451d6bdb787e Ard Biesheuvel   2015-04-09  33  	return sha1_base_do_update(desc, data, len,
> 90451d6bdb787e Ard Biesheuvel   2015-04-09 @34  				   (sha1_block_fn *)sha1_block_data_order);
> f0be44f4fb1fae David McCullough 2012-09-07  35  }
> 604682551aa511 Jussi Kivilinna  2014-07-29  36  EXPORT_SYMBOL_GPL(sha1_update_arm);
> f0be44f4fb1fae David McCullough 2012-09-07  37  

So clan doesn't like the cast on the assembly function.

Ard, why can't we just change the signature of the assembly
function instead of casting?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

       reply	other threads:[~2022-12-08  4:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202211041904.f9S5gAGL-lkp@intel.com>
2022-12-08  4:58 ` Herbert Xu [this message]
2022-12-08 18:05   ` arch/arm/crypto/sha1_glue.c:34:8: warning: cast from 'void (*)(u32 *, const unsigned char *, unsigned int)' (aka 'void (*)(unsigned int *, const unsigned char *, unsigned int)') to 'sha1_block_fn *' (aka 'void (*)(struct sha1_state *, const unsigned char Ard Biesheuvel
2022-12-13 10:43     ` [PATCH] crypto: arm/sha1 - Fix clang function cast warnings Herbert Xu
2022-12-13 11:11       ` Ard Biesheuvel
2022-12-13 15:19       ` Elliott, Robert (Servers)
2022-12-13 19:45       ` Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5FvChDBD/+uaFy8@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ardb@kernel.org \
    --cc=elliott@hpe.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox