linux-next: build warning after merge of the crypto tree

2019-08-22 Thread Stephen Rothwell
Hi all,

After merging the crypto tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

WARNING: modpost: missing MODULE_LICENSE() in lib/crypto/libsha256.o
see include/linux/module.h for more information

Presumably introduced by commit

  01d3aee86625 ("crypto: sha256 - Make lib/crypto/sha256.c suitable for generic 
use")

-- 
Cheers,
Stephen Rothwell


pgppjJ5Hcmc4p.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the crypto tree

2019-02-03 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/qat/qat_common/adf_transport.c: In function 'adf_init_etr_data':
drivers/crypto/qat/qat_common/adf_transport.c:501:1: warning: label 
'err_bank_debug' defined but not used [-Wunused-label]
 err_bank_debug:
 ^~

Introduced by commit

  f0fcf9ade46a ("crypto: qat - no need to check return value of debugfs_create 
functions")

-- 
Cheers,
Stephen Rothwell


pgpCUD5vkjmbN.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the crypto tree

2018-10-04 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

drivers/crypto/cavium/nitrox/nitrox_debugfs.c: In function 'stats_show':
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:62:30: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Posted: %lld\n", atomic64_read(>stats.posted));
   ~~~^ ~~
   %ld
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:63:33: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Completed: %lld\n",
  ~~~^
  %ld
  atomic64_read(>stats.completed));
  ~
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:65:31: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Dropped: %lld\n", atomic64_read(>stats.dropped));
~~~^ ~~~
%ld

Introduced by commit

  2a8780be9c26 ("crypto: cavium/nitrox - updated debugfs information.")

-- 
Cheers,
Stephen Rothwell


pgpWq5TyA7n7S.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the crypto tree

2018-10-04 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

drivers/crypto/cavium/nitrox/nitrox_debugfs.c: In function 'stats_show':
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:62:30: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Posted: %lld\n", atomic64_read(>stats.posted));
   ~~~^ ~~
   %ld
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:63:33: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Completed: %lld\n",
  ~~~^
  %ld
  atomic64_read(>stats.completed));
  ~
drivers/crypto/cavium/nitrox/nitrox_debugfs.c:65:31: warning: format '%lld' 
expects argument of type 'long long int', but argument 3 has type 'long int' 
[-Wformat=]
  seq_printf(s, "  Dropped: %lld\n", atomic64_read(>stats.dropped));
~~~^ ~~~
%ld

Introduced by commit

  2a8780be9c26 ("crypto: cavium/nitrox - updated debugfs information.")

-- 
Cheers,
Stephen Rothwell


pgpWq5TyA7n7S.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the crypto tree

2018-03-18 Thread Harsh Jain


On 19-03-2018 06:34, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> In file included from drivers/crypto/chelsio/chcr_ipsec.c:66:0:
> drivers/crypto/chelsio/chcr_crypto.h:343:12: warning: 'chcr_ahash_continue' 
> declared 'static' but never defined [-Wunused-function]
>  static int chcr_ahash_continue(struct ahash_request *req);
> ^~~
>
> Introduced by commit
>
>   5110e65536f3 ("crypto: chelsio -Split Hash requests for large scatter 
> gather list")
>
Hi Stephen/Herbert,

I will submit the fix to cryptodev tree.

Thanks & Regards
Harsh Jain



Re: linux-next: build warning after merge of the crypto tree

2018-03-18 Thread Harsh Jain


On 19-03-2018 06:34, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> In file included from drivers/crypto/chelsio/chcr_ipsec.c:66:0:
> drivers/crypto/chelsio/chcr_crypto.h:343:12: warning: 'chcr_ahash_continue' 
> declared 'static' but never defined [-Wunused-function]
>  static int chcr_ahash_continue(struct ahash_request *req);
> ^~~
>
> Introduced by commit
>
>   5110e65536f3 ("crypto: chelsio -Split Hash requests for large scatter 
> gather list")
>
Hi Stephen/Herbert,

I will submit the fix to cryptodev tree.

Thanks & Regards
Harsh Jain



linux-next: build warning after merge of the crypto tree

2018-03-18 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from drivers/crypto/chelsio/chcr_ipsec.c:66:0:
drivers/crypto/chelsio/chcr_crypto.h:343:12: warning: 'chcr_ahash_continue' 
declared 'static' but never defined [-Wunused-function]
 static int chcr_ahash_continue(struct ahash_request *req);
^~~

Introduced by commit

  5110e65536f3 ("crypto: chelsio -Split Hash requests for large scatter gather 
list")

-- 
Cheers,
Stephen Rothwell


pgpEvrYyCH_JK.pgp
Description: OpenPGP digital signature


linux-next: build warning after merge of the crypto tree

2018-03-18 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from drivers/crypto/chelsio/chcr_ipsec.c:66:0:
drivers/crypto/chelsio/chcr_crypto.h:343:12: warning: 'chcr_ahash_continue' 
declared 'static' but never defined [-Wunused-function]
 static int chcr_ahash_continue(struct ahash_request *req);
^~~

Introduced by commit

  5110e65536f3 ("crypto: chelsio -Split Hash requests for large scatter gather 
list")

-- 
Cheers,
Stephen Rothwell


pgpEvrYyCH_JK.pgp
Description: OpenPGP digital signature


Re: linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Herbert Xu
On Fri, Jan 19, 2018 at 09:51:43AM +0530, Harsh Jain wrote:
> Hi Herbert,
> 
> It's an indentation issue. Seems checkpatch and default compile options does 
> not report this warning.
> 
> How would you like to take the fix. Should I sent whole series again with fix 
> or only indentation patch.

Please send an incremental patch.

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


Re: linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Herbert Xu
On Fri, Jan 19, 2018 at 09:51:43AM +0530, Harsh Jain wrote:
> Hi Herbert,
> 
> It's an indentation issue. Seems checkpatch and default compile options does 
> not report this warning.
> 
> How would you like to take the fix. Should I sent whole series again with fix 
> or only indentation patch.

Please send an incremental patch.

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


Re: linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Harsh Jain
Hi Herbert,

It's an indentation issue. Seems checkpatch and default compile options does 
not report this warning.

How would you like to take the fix. Should I sent whole series again with fix 
or only indentation patch.


On 19-01-2018 07:19, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr':
> drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does not 
> guard... [-Wmisleading-indentation]
>   if (error)
>   ^~
> drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the 
> latter is misleadingly indented as if it were guarded by the 'if'
>dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
>^~
>
> Introduced by commit
>
>   e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check")
>



Re: linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Harsh Jain
Hi Herbert,

It's an indentation issue. Seems checkpatch and default compile options does 
not report this warning.

How would you like to take the fix. Should I sent whole series again with fix 
or only indentation patch.


On 19-01-2018 07:19, Stephen Rothwell wrote:
> Hi Herbert,
>
> After merging the crypto tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr':
> drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does not 
> guard... [-Wmisleading-indentation]
>   if (error)
>   ^~
> drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the 
> latter is misleadingly indented as if it were guarded by the 'if'
>dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
>^~
>
> Introduced by commit
>
>   e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check")
>



linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr':
drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does not 
guard... [-Wmisleading-indentation]
  if (error)
  ^~
drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the 
latter is misleadingly indented as if it were guarded by the 'if'
   dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
   ^~

Introduced by commit

  e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check")

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the crypto tree

2018-01-18 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/chelsio/chcr_algo.c: In function 'create_authenc_wr':
drivers/crypto/chelsio/chcr_algo.c:2113:2: warning: this 'if' clause does not 
guard... [-Wmisleading-indentation]
  if (error)
  ^~
drivers/crypto/chelsio/chcr_algo.c:2115:3: note: ...this statement, but the 
latter is misleadingly indented as if it were guarded by the 'if'
   dnents = sg_nents_xlen(req->dst, assoclen, CHCR_DST_SG_SIZE, 0);
   ^~

Introduced by commit

  e1a018e607a3 ("crypto: chelsio - Remove dst sg size zero check")

-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the crypto tree

2017-07-31 Thread Gary R Hook

On 07/30/2017 09:17 PM, Stephen Rothwell wrote:

Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
   cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
   ^

Maybe introduced by commit

  6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")



Actually, it's been this way for a while: 956ee21 should be the commit 
that introduced the spurious warning.


If you can explain to me a way to get the compiler to either (a) be 
smarter, or (b) shut up about this, I'd like to hear it. I see this with 
gcc 4.8/4.9/50.


IMO the compiler is incorrect. The code path where the variable is used 
is complete, and the path where it is unused is complete. I don't see a 
way for a logic error (and thus, use an uninitialized variable) to occur.


If someone can enlighten me, I'd appreciate it. Or, I can change the 
code to recompute the value when it's needed.




Re: linux-next: build warning after merge of the crypto tree

2017-07-31 Thread Gary R Hook

On 07/30/2017 09:17 PM, Stephen Rothwell wrote:

Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
   cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
   ^

Maybe introduced by commit

  6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")



Actually, it's been this way for a while: 956ee21 should be the commit 
that introduced the spurious warning.


If you can explain to me a way to get the compiler to either (a) be 
smarter, or (b) shut up about this, I'd like to hear it. I see this with 
gcc 4.8/4.9/50.


IMO the compiler is incorrect. The code path where the variable is used 
is complete, and the path where it is unused is complete. I don't see a 
way for a logic error (and thus, use an uninitialized variable) to occur.


If someone can enlighten me, I'd appreciate it. Or, I can change the 
code to recompute the value when it's needed.




linux-next: build warning after merge of the crypto tree

2017-07-30 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
   cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
   ^

Maybe introduced by commit

  6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the crypto tree

2017-07-30 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
drivers/crypto/ccp/ccp-ops.c:1856:3: warning: 'sb_count' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
   cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
   ^

Maybe introduced by commit

  6ba46c7d4d7e ("crypto: ccp - Fix base RSA function for version 5 CCPs")

-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Stephen Rothwell
Hi Herbert,

On Thu, 25 Aug 2016 15:47:01 +0800 Herbert Xu  
wrote:
>
> I'm going to do something like this:
> 
> ---8<---
> This patch fixes an unused label warning triggered when the macro
> XOR_SELECT_TEMPLATE is not set.
> 
> Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...")
> Reported-by: Stephen Rothwell 
> Signed-off-by: Herbert Xu 
> 
> diff --git a/crypto/xor.c b/crypto/xor.c
> index b8975d9..69866e9 100644
> --- a/crypto/xor.c
> +++ b/crypto/xor.c
> @@ -113,13 +113,14 @@ calibrate_xor_blocks(void)
>  
>  #ifdef XOR_SELECT_TEMPLATE
>   fastest = XOR_SELECT_TEMPLATE(fastest);
> +#endif
> +
>   if (fastest) {
>   printk(KERN_INFO "xor: automatically using best "
>"checksumming function   %-10s\n",
>  fastest->name);
>   goto out;
>   }
> -#endif

That looks fine to me.  An alternative might be to have:

#ifndef XOR_SELECT_TEMPLATE
#define XOR_SELECT_TEMPLATE(x)  (x)
#endif

near the top of the file.  That gets the #ifdef out of the code flow
and serves as some hint that such a thing can be defined by arch header
files.

Either way.
-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Stephen Rothwell
Hi Herbert,

On Thu, 25 Aug 2016 15:47:01 +0800 Herbert Xu  
wrote:
>
> I'm going to do something like this:
> 
> ---8<---
> This patch fixes an unused label warning triggered when the macro
> XOR_SELECT_TEMPLATE is not set.
> 
> Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...")
> Reported-by: Stephen Rothwell 
> Signed-off-by: Herbert Xu 
> 
> diff --git a/crypto/xor.c b/crypto/xor.c
> index b8975d9..69866e9 100644
> --- a/crypto/xor.c
> +++ b/crypto/xor.c
> @@ -113,13 +113,14 @@ calibrate_xor_blocks(void)
>  
>  #ifdef XOR_SELECT_TEMPLATE
>   fastest = XOR_SELECT_TEMPLATE(fastest);
> +#endif
> +
>   if (fastest) {
>   printk(KERN_INFO "xor: automatically using best "
>"checksumming function   %-10s\n",
>  fastest->name);
>   goto out;
>   }
> -#endif

That looks fine to me.  An alternative might be to have:

#ifndef XOR_SELECT_TEMPLATE
#define XOR_SELECT_TEMPLATE(x)  (x)
#endif

near the top of the file.  That gets the #ifdef out of the code flow
and serves as some hint that such a thing can be defined by arch header
files.

Either way.
-- 
Cheers,
Stephen Rothwell


Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Martin Schwidefsky
On Thu, 25 Aug 2016 11:38:24 +1000
Stephen Rothwell  wrote:

> Hi Herbert,
> 
> After merging the crypto tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> crypto/xor.c: In function 'calibrate_xor_blocks':
> crypto/xor.c:156:1: warning: label 'out' defined but not used [-Wunused-label]
>  out:
>  ^
> 
> Introduced by commit
> 
>   39457acda913 ("crypto: xor - skip speed test if the xor function is 
> selected automatically")
> 
> This build does not have XOR_SELECT_TEMPLATE set.

Hmm, this is probably the best option to get rid of the warning: 
--
diff --git a/crypto/xor.c b/crypto/xor.c
index b8975d9..f00edfc 100644
--- a/crypto/xor.c
+++ b/crypto/xor.c
@@ -117,7 +117,8 @@ calibrate_xor_blocks(void)
printk(KERN_INFO "xor: automatically using best "
 "checksumming function   %-10s\n",
   fastest->name);
-   goto out;
+   active_template = fastest;
+   return 0;
}
 #endif
 
@@ -153,7 +154,6 @@ calibrate_xor_blocks(void)
 #undef xor_speed
 
free_pages((unsigned long)b1, 2);
-out:
active_template = fastest;
return 0;
 }
-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.



Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Martin Schwidefsky
On Thu, 25 Aug 2016 11:38:24 +1000
Stephen Rothwell  wrote:

> Hi Herbert,
> 
> After merging the crypto tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> crypto/xor.c: In function 'calibrate_xor_blocks':
> crypto/xor.c:156:1: warning: label 'out' defined but not used [-Wunused-label]
>  out:
>  ^
> 
> Introduced by commit
> 
>   39457acda913 ("crypto: xor - skip speed test if the xor function is 
> selected automatically")
> 
> This build does not have XOR_SELECT_TEMPLATE set.

Hmm, this is probably the best option to get rid of the warning: 
--
diff --git a/crypto/xor.c b/crypto/xor.c
index b8975d9..f00edfc 100644
--- a/crypto/xor.c
+++ b/crypto/xor.c
@@ -117,7 +117,8 @@ calibrate_xor_blocks(void)
printk(KERN_INFO "xor: automatically using best "
 "checksumming function   %-10s\n",
   fastest->name);
-   goto out;
+   active_template = fastest;
+   return 0;
}
 #endif
 
@@ -153,7 +154,6 @@ calibrate_xor_blocks(void)
 #undef xor_speed
 
free_pages((unsigned long)b1, 2);
-out:
active_template = fastest;
return 0;
 }
-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.



Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Herbert Xu
On Thu, Aug 25, 2016 at 08:20:10AM +0200, Martin Schwidefsky wrote:
> On Thu, 25 Aug 2016 11:38:24 +1000
> Stephen Rothwell  wrote:
> 
> > Hi Herbert,
> > 
> > After merging the crypto tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > crypto/xor.c: In function 'calibrate_xor_blocks':
> > crypto/xor.c:156:1: warning: label 'out' defined but not used 
> > [-Wunused-label]
> >  out:
> >  ^
> > 
> > Introduced by commit
> > 
> >   39457acda913 ("crypto: xor - skip speed test if the xor function is 
> > selected automatically")
> > 
> > This build does not have XOR_SELECT_TEMPLATE set.
> 
> Hmm, this is probably the best option to get rid of the warning: 

I'm going to do something like this:

---8<---
This patch fixes an unused label warning triggered when the macro
XOR_SELECT_TEMPLATE is not set.

Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...")
Reported-by: Stephen Rothwell 
Signed-off-by: Herbert Xu 

diff --git a/crypto/xor.c b/crypto/xor.c
index b8975d9..69866e9 100644
--- a/crypto/xor.c
+++ b/crypto/xor.c
@@ -113,13 +113,14 @@ calibrate_xor_blocks(void)
 
 #ifdef XOR_SELECT_TEMPLATE
fastest = XOR_SELECT_TEMPLATE(fastest);
+#endif
+
if (fastest) {
printk(KERN_INFO "xor: automatically using best "
 "checksumming function   %-10s\n",
   fastest->name);
goto out;
}
-#endif
 
/*
 * Note: Since the memory is not actually used for _anything_ but to

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


Re: linux-next: build warning after merge of the crypto tree

2016-08-25 Thread Herbert Xu
On Thu, Aug 25, 2016 at 08:20:10AM +0200, Martin Schwidefsky wrote:
> On Thu, 25 Aug 2016 11:38:24 +1000
> Stephen Rothwell  wrote:
> 
> > Hi Herbert,
> > 
> > After merging the crypto tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > crypto/xor.c: In function 'calibrate_xor_blocks':
> > crypto/xor.c:156:1: warning: label 'out' defined but not used 
> > [-Wunused-label]
> >  out:
> >  ^
> > 
> > Introduced by commit
> > 
> >   39457acda913 ("crypto: xor - skip speed test if the xor function is 
> > selected automatically")
> > 
> > This build does not have XOR_SELECT_TEMPLATE set.
> 
> Hmm, this is probably the best option to get rid of the warning: 

I'm going to do something like this:

---8<---
This patch fixes an unused label warning triggered when the macro
XOR_SELECT_TEMPLATE is not set.

Fixes: 39457acda913 ("crypto: xor - skip speed test if the xor...")
Reported-by: Stephen Rothwell 
Signed-off-by: Herbert Xu 

diff --git a/crypto/xor.c b/crypto/xor.c
index b8975d9..69866e9 100644
--- a/crypto/xor.c
+++ b/crypto/xor.c
@@ -113,13 +113,14 @@ calibrate_xor_blocks(void)
 
 #ifdef XOR_SELECT_TEMPLATE
fastest = XOR_SELECT_TEMPLATE(fastest);
+#endif
+
if (fastest) {
printk(KERN_INFO "xor: automatically using best "
 "checksumming function   %-10s\n",
   fastest->name);
goto out;
}
-#endif
 
/*
 * Note: Since the memory is not actually used for _anything_ but to

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


linux-next: build warning after merge of the crypto tree

2016-08-24 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

crypto/xor.c: In function 'calibrate_xor_blocks':
crypto/xor.c:156:1: warning: label 'out' defined but not used [-Wunused-label]
 out:
 ^

Introduced by commit

  39457acda913 ("crypto: xor - skip speed test if the xor function is selected 
automatically")

This build does not have XOR_SELECT_TEMPLATE set.

-- 
Cheers,
Stephen Rothwell


linux-next: build warning after merge of the crypto tree

2016-08-24 Thread Stephen Rothwell
Hi Herbert,

After merging the crypto tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

crypto/xor.c: In function 'calibrate_xor_blocks':
crypto/xor.c:156:1: warning: label 'out' defined but not used [-Wunused-label]
 out:
 ^

Introduced by commit

  39457acda913 ("crypto: xor - skip speed test if the xor function is selected 
automatically")

This build does not have XOR_SELECT_TEMPLATE set.

-- 
Cheers,
Stephen Rothwell