[PATCH v4 5/6] kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We had open coded the definition of OPTIMIZER_HIDE_VAR() as a fix but now
that we have the generic tools/include available and that has had a
definition of OPTIMIZER_HIDE_VAR() we can switch to the define.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
 tools/testing/selftests/arm64/signal/test_signals_utils.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.h b/tools/testing/selftests/arm64/signal/test_signals_utils.h
index c7f5627171dd..762c8fe9c54a 100644
--- a/tools/testing/selftests/arm64/signal/test_signals_utils.h
+++ b/tools/testing/selftests/arm64/signal/test_signals_utils.h
@@ -8,6 +8,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <linux/compiler.h>
+
 #include "test_signals.h"
 
 int test_init(struct tdescr *td);
@@ -76,7 +78,7 @@ static __always_inline bool get_current_context(struct tdescr *td,
 	 */
 	for (i = 0; i < td->live_sz; i++) {
 		uc[i] = 0;
-		__asm__ ("" : "=r" (uc[i]) : "0" (uc[i]));
+		OPTIMIZER_HIDE_VAR(uc[0]);
 	}
 
 	td->live_uc = dest_uc;

-- 
2.30.2




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux