Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
From: Joe Perches <joe@perches.com>
To: Corentin Labbe <clabbe@baylibre.com>,
	davem@davemloft.net, herbert@gondor.apana.org.au,
	mripard@kernel.org, wens@csie.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness
Date: Tue, 21 Jul 2020 14:32:15 -0700
Message-ID: <11ac49bc33546ef9ebc4120878206bd882667d8a.camel@perches.com> (raw)
In-Reply-To: <1595358391-34525-17-git-send-email-clabbe@baylibre.com>

On Tue, 2020-07-21 at 19:06 +0000, Corentin Labbe wrote:
> This patch fixes the warning:
> warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]

I think these do not really need conversion.
Are these useful compiler warnings ?

> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
>  drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
> index 3901e3401c6b..7b2a142c9b8d 100644
> --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
> +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
> @@ -566,7 +566,7 @@ static struct sun8i_ce_alg_template ce_algs[] = {
>  static int sun8i_ce_dbgfs_read(struct seq_file *seq, void *v)
>  {
>  	struct sun8i_ce_dev *ce = seq->private;
> -	int i;
> +	unsigned int i;
>  
>  	for (i = 0; i < MAXFLOW; i++)
>  		seq_printf(seq, "Channel %d: nreq %lu\n", i, ce->chanlist[i].stat_req);
> @@ -778,7 +778,8 @@ static int sun8i_ce_get_clks(struct sun8i_ce_dev *ce)
>  
>  static int sun8i_ce_register_algs(struct sun8i_ce_dev *ce)
>  {
> -	int ce_method, err, id, i;
> +	int ce_method, err, id;
> +	unsigned int i;
>  
>  	for (i = 0; i < ARRAY_SIZE(ce_algs); i++) {
>  		ce_algs[i].ce = ce;
> @@ -858,7 +859,7 @@ static int sun8i_ce_register_algs(struct sun8i_ce_dev *ce)
>  
>  static void sun8i_ce_unregister_algs(struct sun8i_ce_dev *ce)
>  {
> -	int i;
> +	unsigned int i;
>  
>  	for (i = 0; i < ARRAY_SIZE(ce_algs); i++) {
>  		if (!ce_algs[i].ce)


  reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 19:06 [PATCH v4 00/17] crypto: allwinner: add xRNG and hashes Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 01/17] crypto: sun8i-ss: Add SS_START define Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 02/17] crypto: sun8i-ss: Add support for the PRNG Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 03/17] crypto: sun8i-ss: support hash algorithms Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 04/17] crypto: sun8i-ss: fix a trivial typo Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 05/17] crypto: sun8i-ss: Add more comment on some structures Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 06/17] crypto: sun8i-ss: better debug printing Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 07/17] crypto: sun8i-ce: handle endianness of t_common_ctl Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context Corentin Labbe
2020-07-31  8:24   ` Herbert Xu
2020-08-21  7:35     ` LABBE Corentin
2020-08-21  7:36       ` Herbert Xu
2020-07-21 19:06 ` [PATCH v4 09/17] crypto: sun8i-ce: split into prepare/run/unprepare Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 10/17] crypto: sun8i-ce: handle different error registers Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 12/17] crypto: sun8i-ce: support hash algorithms Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 13/17] crypto: sun8i-ce: Add stat_bytes debugfs Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 14/17] crypto: sun8i-ce: Add support for the PRNG Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 15/17] crypto: sun8i-ce: Add support for the TRNG Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness Corentin Labbe
2020-07-21 21:32   ` Joe Perches [this message]
2020-07-22  4:57     ` [PATCH] Makefile.extrawarn: Move sign-compare from W=2 to W=3 Joe Perches
2020-07-27  4:55       ` Masahiro Yamada
2020-07-22  6:21     ` [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness LABBE Corentin
2020-07-21 19:06 ` [PATCH v4 17/17] crypto: sun8i-ss: " Corentin Labbe

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=11ac49bc33546ef9ebc4120878206bd882667d8a.camel@perches.com \
    --to=joe@perches.com \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=wens@csie.org \
    /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

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org
	public-inbox-index linux-crypto

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git