Skip to content

Commit bd62710

Browse files
Alexey DobriyanKAGA-KOKO
authored andcommitted
x86/alternatives: Fixup alternative_call_2
The following pattern fails to compile while the same pattern with alternative_call() does: if (...) alternative_call_2(...); else alternative_call_2(...); as it expands into if (...) { }; <=== else { }; Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/20180114120504.GA11368@avx2
1 parent 3c1f058 commit bd62710

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/x86/include/asm/alternative.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,11 @@ static inline int alternatives_text_reserved(void *start, void *end)
218218
*/
219219
#define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2, \
220220
output, input...) \
221-
{ \
222221
asm volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\
223222
"call %P[new2]", feature2) \
224223
: output, ASM_CALL_CONSTRAINT \
225224
: [old] "i" (oldfunc), [new1] "i" (newfunc1), \
226-
[new2] "i" (newfunc2), ## input); \
227-
}
225+
[new2] "i" (newfunc2), ## input)
228226

229227
/*
230228
* use this macro(s) if you need more than one output parameter

0 commit comments

Comments
 (0)