Skip to contentSkip to conversation

crypto: hide unused label

PATCH In review Arnd Bergmann 2 participants 3 messages Aug 29, 2016 – Aug 31, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 crypto: hide unused label

A recent change left an existing label unused in some configurations, as seen from a gcc warning:

crypto/xor.c: In function 'calibrate_xor_blocks':
crypto/xor.c:156:1: error: label 'out' defined but not used [-Werror=unused-label]

This adds an #ifdef around it to match the one around the respective "goto".

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

---
v2: add proper changelog, sorry for missing that at first.

---
 crypto/xor.c | 2 ++
 1 file changed, 2 insertions(+)
crypto/xor.c +2 -0
index b8975d92cd94..1817015381ef 100644
@@ -153,7 +153,9 @@ calibrate_xor_blocks(void)
 #undef xor_speed
 
 	free_pages((unsigned long)b1, 2);
+#ifdef XOR_SELECT_TEMPLATE
 out:
+#endif
 	active_template = fastest;
 	return 0;
 }
Signature · 1 line
2.9.0
maintainer
#1 lore raw
Quoted 10 lines · Arnd Bergmann

A recent change left an existing label unused in some configurations, as seen from a gcc warning:

crypto/xor.c: In function 'calibrate_xor_blocks':
crypto/xor.c:156:1: error: label 'out' defined but not used [-Werror=unused-label]

This adds an #ifdef around it to match the one around the respective "goto".

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

Thanks for the patch. But I've already queued up a fix at

https://patchwork.kernel.org/patch/9301603/

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
Quoted 7 lines · CEST Herbert Xu
Quoted 6 lines · Arnd Bergmann

A recent change left an existing label unused in some configurations, as seen from a gcc warning:

crypto/xor.c: In function 'calibrate_xor_blocks':
crypto/xor.c:156:1: error: label 'out' defined but not used [-Werror=unused-label]

Quoted 9 lines
Quoted 4 lines

This adds an #ifdef around it to match the one around the respective "goto".

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

Thanks for the patch. But I've already queued up a fix at

https://patchwork.kernel.org/patch/9301603/

Ok, that one looks like a nicer solution anyway.

Arnd