Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton

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@kernel.org>
Link: https://lore.kernel.org/r/20230728-arm64-signal-memcpy-fix-v4-5-0c1290db5d46@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Mark Brown and committed by
Will Deacon
db7a89f7 35d7bc98

+3 -1
+3 -1
tools/testing/selftests/arm64/signal/test_signals_utils.h
··· 8 8 #include <stdio.h> 9 9 #include <string.h> 10 10 11 + #include <linux/compiler.h> 12 + 11 13 #include "test_signals.h" 12 14 13 15 int test_init(struct tdescr *td); ··· 78 76 */ 79 77 for (i = 0; i < td->live_sz; i++) { 80 78 uc[i] = 0; 81 - __asm__ ("" : "=r" (uc[i]) : "0" (uc[i])); 79 + OPTIMIZER_HIDE_VAR(uc[0]); 82 80 } 83 81 84 82 td->live_uc = dest_uc;