[PATCH] selftests/powerpc: Remove unneeded variable

Michael Ellerman mpe at ellerman.id.au
Thu Jun 15 13:51:48 AEST 2023


wuyonggang001 at 208suo.com writes:
> Fix the following coccicheck warning:
>
> tools/testing/selftests/powerpc/alignment/alignment_handler.c:558:5-7: 
> Unneeded variable: "rc". Return "0"

The check is wrong.

> diff --git 
> a/tools/testing/selftests/powerpc/alignment/alignment_handler.c 
> b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> index 33ee34fc0828..4980656c3f70 100644
> --- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> +++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
> @@ -332,7 +332,7 @@ int test_alignment_handler_vsx_206(void)
>       STORE_VSX_XFORM_TEST(stxvd2x);
>       STORE_VSX_XFORM_TEST(stxvw4x);
>       STORE_VSX_XFORM_TEST(stxsdx);
> -    return rc;
> +    return 0;

rc is used in the macros.

cheers


More information about the Linuxppc-dev mailing list