public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Avoid undefined behavior in macro expansion
@ 2016-03-17  2:48 Vinicius Tinti
  2016-03-19  2:15 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Vinicius Tinti @ 2016-03-17  2:48 UTC (permalink / raw)
  To: herbert, davem, tglx, mingo, hpa, x86
  Cc: linux-crypto, linux-kernel, Vinicius Tinti

C11 standard (at 6.10.3.3) says that ## operator (paste) has undefined
behavior when one of the result operands is not a valid preprocessing
token.

Therefore the macro expansion may depend on compiler implementation
which may or no preserve the leading white space.

Moreover other places in kernel use CONCAT(a,b) instead of CONCAT(a, b).
Changing favors concise usage.

Signed-off-by: Vinicius Tinti <viniciustinti@gmail.com>
Acked-by: Behan Webster <behanw@converseincode.com>
---
 arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S b/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
index a916c4a..7a71553 100644
--- a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
+++ b/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
@@ -93,7 +93,7 @@
 
 #define tmp		%r10
 #define	DDQ(i)		CONCAT(ddq_add_,i)
-#define	XMM(i)		CONCAT(%xmm, i)
+#define	XMM(i)		CONCAT(%xmm,i)
 #define	DDQ_DATA	0
 #define	XDATA		1
 #define KEY_128		1
-- 
2.7.3

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

end of thread, other threads:[~2016-03-22  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17  2:48 [PATCH] x86: Avoid undefined behavior in macro expansion Vinicius Tinti
2016-03-19  2:15 ` Al Viro
2016-03-22  2:18   ` Vinicius Tinti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox