lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11ac49bc33546ef9ebc4120878206bd882667d8a.camel@perches.com>
Date:   Tue, 21 Jul 2020 14:32:15 -0700
From:   Joe Perches <joe@...ches.com>
To:     Corentin Labbe <clabbe@...libre.com>, davem@...emloft.net,
        herbert@...dor.apana.org.au, mripard@...nel.org, wens@...e.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer
 expressions of different signedness

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@...libre.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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ