diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-26 11:19:39 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-31 11:00:48 -0400 |
commit | 27c4d548af958233e26ab5b00719ff3e49b3aebe (patch) | |
tree | 5dc99b2e6d9f4e3837e3abfcdf5f67bb10346c67 | |
parent | 85962d2248fae84ffaa04f09826596d20af56819 (diff) |
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 <sfr@canb.auug.org.au>
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-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 b8975d92cd94..263af9fb45ea 100644 --- a/crypto/xor.c +++ b/crypto/xor.c | |||
@@ -24,6 +24,10 @@ | |||
24 | #include <linux/preempt.h> | 24 | #include <linux/preempt.h> |
25 | #include <asm/xor.h> | 25 | #include <asm/xor.h> |
26 | 26 | ||
27 | #ifndef XOR_SELECT_TEMPLATE | ||
28 | #define XOR_SELECT_TEMPLATE(x) (x) | ||
29 | #endif | ||
30 | |||
27 | /* The xor routines to use. */ | 31 | /* The xor routines to use. */ |
28 | static struct xor_block_template *active_template; | 32 | static struct xor_block_template *active_template; |
29 | 33 | ||
@@ -109,17 +113,14 @@ calibrate_xor_blocks(void) | |||
109 | void *b1, *b2; | 113 | void *b1, *b2; |
110 | struct xor_block_template *f, *fastest; | 114 | struct xor_block_template *f, *fastest; |
111 | 115 | ||
112 | fastest = NULL; | 116 | fastest = XOR_SELECT_TEMPLATE(NULL); |
113 | 117 | ||
114 | #ifdef XOR_SELECT_TEMPLATE | ||
115 | fastest = XOR_SELECT_TEMPLATE(fastest); | ||
116 | if (fastest) { | 118 | if (fastest) { |
117 | printk(KERN_INFO "xor: automatically using best " | 119 | printk(KERN_INFO "xor: automatically using best " |
118 | "checksumming function %-10s\n", | 120 | "checksumming function %-10s\n", |
119 | fastest->name); | 121 | fastest->name); |
120 | goto out; | 122 | goto out; |
121 | } | 123 | } |
122 | #endif | ||
123 | 124 | ||
124 | /* | 125 | /* |
125 | * Note: Since the memory is not actually used for _anything_ but to | 126 | * Note: Since the memory is not actually used for _anything_ but to |