All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/alternatives: fixup alternative_call_2
@ 2017-12-25 15:06 Alexey Dobriyan
  2018-01-14 11:54 ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2017-12-25 15:06 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: x86, linux-kernel

The following pattern fails to compile while the same pattern
with alternative_call() does.

	if (...)
		alternative_call_2(...);
	else
		alternative_call_2(...);

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/x86/include/asm/alternative.h |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -218,13 +218,11 @@ static inline int alternatives_text_reserved(void *start, void *end)
  */
 #define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2,   \
 			   output, input...)				      \
-{									      \
 	asm volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\
 		"call %P[new2]", feature2)				      \
 		: output, ASM_CALL_CONSTRAINT				      \
 		: [old] "i" (oldfunc), [new1] "i" (newfunc1),		      \
-		  [new2] "i" (newfunc2), ## input);			      \
-}
+		  [new2] "i" (newfunc2), ## input)
 
 /*
  * use this macro(s) if you need more than one output parameter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-27  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-25 15:06 [PATCH] x86/alternatives: fixup alternative_call_2 Alexey Dobriyan
2018-01-14 11:54 ` Thomas Gleixner
2018-01-14 12:05   ` [PATCH v2] " Alexey Dobriyan
2018-03-26 10:37     ` [tip:x86/asm] x86/alternatives: Fixup alternative_call_2 tip-bot for Alexey Dobriyan
2018-03-27  7:51     ` [tip:x86/pti] " tip-bot for Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.