x86/paravirt: hide unused patch_default label
Subsystems (3)
PATCH 1/1 x86/paravirt: hide unused patch_default label
A bugfix introduced a harmless warning:
arch/x86/kernel/paravirt_patch_32.c: In function 'native_patch':arch/x86/kernel/paravirt_patch_32.c:71:1: error: label 'patch_default' defined but not used [-Werror=unused-label]
This puts it in the same #ifdef as its caller.
--- arch/x86/kernel/paravirt_patch_32.c | 2 ++ arch/x86/kernel/paravirt_patch_64.c | 2 ++ 2 files changed, 4 insertions(+)
arch/x86/kernel/paravirt_patch_32.c +2 -0
@@ -68,7 +68,9 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,#endif default : +#if defined(CONFIG_PARAVIRT_SPINLOCKS ) patch_default: +#endif ret =paravirt_patch_default (type, clobbers, ibuf, addr, len);break ;
arch/x86/kernel/paravirt_patch_64.c +2 -0
@@ -80,7 +80,9 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,#endif default : +#if defined(CONFIG_PARAVIRT_SPINLOCKS ) patch_default: +#endif ret =paravirt_patch_default (type, clobbers, ibuf, addr, len);break ;
Signature · 1 line
2.9.0
Quoted 10 lines · Arnd Bergmann
A bugfix introduced a harmless warning:
arch/x86/kernel/paravirt_patch_32.c: In function 'native_patch':arch/x86/kernel/paravirt_patch_32.c:71:1: error: label 'patch_default' defined but not used [-Werror=unused-label]This puts it in the same #ifdef as its caller.
Fixes 45dbea5f55c0 ("x86/paravirt: Fix native_patch()")Signed-off-by Arnd Bergmann <[email protected]>---
This seems to work as well and is less invasive
arch/x86/kernel/paravirt_patch_32.c | 2 +- arch/x86/kernel/paravirt_patch_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/paravirt_patch_32.c +1 -1
@@ -68,7 +68,7 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,#endif default : -patch_default: +patch_default:__maybe_unused ret =paravirt_patch_default (type, clobbers, ibuf, addr, len);break ;
arch/x86/kernel/paravirt_patch_64.c +1 -1
@@ -80,7 +80,7 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,#endif default : -patch_default: +patch_default:__maybe_unused ret =paravirt_patch_default (type, clobbers, ibuf, addr, len);break ;
arch/x86/kernel/paravirt_patch_32.c unsigned native_patch(u8 type, u16 clobbers, void *ibuf, · line 73
Quoted 5 lines · CET Peter Zijlstra
arch/x86/kernel/paravirt_patch_32.c +1
-1-patch_default: +patch_default:__maybe_unused ret =paravirt_patch_default (type, clobbers, ibuf, addr, len);break ;
Ah, nice, I didn't know you could do that. Yes, please do this instead.
Arnd