From: Herbert Xu Date: Fri, 26 Aug 2016 15:19:39 +0000 (+0800) Subject: crypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=27c4d548af958233e26ab5b00719ff3e49b3aebe;p=linux-beck.git 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: 39457acda913 ("crypto: xor - skip speed test if the xor...") Reported-by: Stephen Rothwell Suggested-by: Stephen Rothwell Signed-off-by: Herbert Xu --- diff --git a/crypto/xor.c b/crypto/xor.c index b8975d92cd94..263af9fb45ea 100644 --- a/crypto/xor.c +++ b/crypto/xor.c @@ -24,6 +24,10 @@ #include #include +#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