Skip to content

Commit

Permalink
selftests/timens: remove ARRAY_SIZE define from individual tests
Browse files Browse the repository at this point in the history
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 timens tests and pickup the one defined in
kselftest.h.

Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
shuahkh committed Dec 11, 2021
1 parent 08ca351 commit 7527c03
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tools/testing/selftests/timens/procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#define DAY_IN_SEC (60*60*24)
#define TEN_DAYS_IN_SEC (10*DAY_IN_SEC)

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

static int child_ns, parent_ns;

static int switch_ns(int fd)
Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/timens/timens.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#define DAY_IN_SEC (60*60*24)
#define TEN_DAYS_IN_SEC (10*DAY_IN_SEC)

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

struct test_clock {
clockid_t id;
char *name;
Expand Down

0 comments on commit 7527c03

Please sign in to comment.