diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-26 23:19:39 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-31 23:00:48 +0800 |
commit | 30809d18f22ad1b4ed32b4d885a55f0abcadeb86 (patch) | |
tree | 5d25f4349c9a88d7e9a0a7af27ba3c7e1836dd7a | |
parent | 51475df34c916c7748c0899d303bb7b3a3092d77 (diff) | |
download | linux-crypto-30809d18f22ad1b4ed32b4d885a55f0abcadeb86.tar.gz linux-crypto-30809d18f22ad1b4ed32b4d885a55f0abcadeb86.zip |
crypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset
This patch fixes an unused label warning triggered when the macro
XOR_SELECT_TEMPLATE is not set.
Fixes: 3e9abf790279 ("crypto: xor - skip speed test if the xor...")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | crypto/xor.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/xor.c b/crypto/xor.c index b8975d92..263af9fb 100644 --- a/crypto/xor.c +++ b/crypto/xor.c @@ -24,6 +24,10 @@ #include <linux/preempt.h> #include <asm/xor.h> +#ifndef XOR_SELECT_TEMPLATE +#define XOR_SELECT_TEMPLATE(x) (x) +#endif + /* The xor routines to use. */ static struct xor_block_template *active_template; @@ -109,17 +113,14 @@ calibrate_xor_blocks(void) void *b1, *b2; struct xor_block_template *f, *fastest; - fastest = NULL; + fastest = XOR_SELECT_TEMPLATE(NULL); -#ifdef XOR_SELECT_TEMPLATE - fastest = XOR_SELECT_TEMPLATE(fastest); 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 |