[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f81e953716b03e9eb2392298b914b703dcfdace8.1639156389.git.skhan@linuxfoundation.org>
Date: Fri, 10 Dec 2021 10:33:18 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: catalin.marinas@....com, will@...nel.org, shuah@...nel.org,
keescook@...omium.org, mic@...ikod.net, davem@...emloft.net,
kuba@...nel.org, peterz@...radead.org, paulmck@...nel.org,
boqun.feng@...il.com, akpm@...ux-foundation.org
Cc: Shuah Khan <skhan@...uxfoundation.org>,
linux-kselftest@...r.kernel.org,
linux-security-module@...r.kernel.org, netdev@...r.kernel.org,
linux-mm@...ck.org
Subject: [PATCH 08/12] selftests/rseq: remove ARRAY_SIZE define from individual tests
ARRAY_SIZE is defined in several selftests. Remove definitions from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.
Remove ARRAY_SIZE from rseq tests and pickup the one defined in
kselftest.h.
Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
---
tools/testing/selftests/rseq/basic_percpu_ops_test.c | 3 +--
tools/testing/selftests/rseq/rseq.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/rseq/basic_percpu_ops_test.c b/tools/testing/selftests/rseq/basic_percpu_ops_test.c
index eb3f6db36d36..b953a52ff706 100644
--- a/tools/testing/selftests/rseq/basic_percpu_ops_test.c
+++ b/tools/testing/selftests/rseq/basic_percpu_ops_test.c
@@ -9,10 +9,9 @@
#include <string.h>
#include <stddef.h>
+#include "../kselftest.h"
#include "rseq.h"
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
struct percpu_lock_entry {
intptr_t v;
} __attribute__((aligned(128)));
diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c
index 7159eb777fd3..fb440dfca158 100644
--- a/tools/testing/selftests/rseq/rseq.c
+++ b/tools/testing/selftests/rseq/rseq.c
@@ -27,10 +27,9 @@
#include <signal.h>
#include <limits.h>
+#include "../kselftest.h"
#include "rseq.h"
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
__thread volatile struct rseq __rseq_abi = {
.cpu_id = RSEQ_CPU_ID_UNINITIALIZED,
};
--
2.32.0
Powered by blists - more mailing lists