[PATCH] kselftest/arm64: Remove local ARRAY_SIZE() definitions

Shuah Khan skhan at linuxfoundation.org
Mon Jan 24 13:30:09 PST 2022


On 1/24/22 10:17 AM, Mark Brown wrote:
> An ARRAY_SIZE() has been added to kselftest.h so remove the local versions
> in some of the arm64 selftests.
> 

Thank you for the patch removing duplicate defines.

> Signed-off-by: Mark Brown <broonie at kernel.org>
> ---
>   tools/testing/selftests/arm64/abi/syscall-abi.c | 1 -
>   tools/testing/selftests/arm64/fp/sve-ptrace.c   | 2 --
>   2 files changed, 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/arm64/abi/syscall-abi.c b/tools/testing/selftests/arm64/abi/syscall-abi.c
> index d8eeeafb50dc..1e13b7523918 100644
> --- a/tools/testing/selftests/arm64/abi/syscall-abi.c
> +++ b/tools/testing/selftests/arm64/abi/syscall-abi.c
> @@ -18,7 +18,6 @@
>   
>   #include "../../kselftest.h"
>   
> -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
>   #define NUM_VL ((SVE_VQ_MAX - SVE_VQ_MIN) + 1)
>   
>   extern void do_syscall(int sve_vl);
> diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c
> index af798b9d232c..90ba1d6a6781 100644
> --- a/tools/testing/selftests/arm64/fp/sve-ptrace.c
> +++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c
> @@ -21,8 +21,6 @@
>   
>   #include "../../kselftest.h"
>   
> -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
> -
>   /* <linux/elf.h> and <sys/auxv.h> don't like each other, so: */
>   #ifndef NT_ARM_SVE
>   #define NT_ARM_SVE 0x405
> 

Assuming this is going through ARM tree?

Reviewed-by: Shuah Khan <skhan at linuxfoundation.org>

thanks,
-- Shuah



More information about the linux-arm-kernel mailing list