[PATCH RFC 2/2] powerpc/selftests: add test for papr-vpd

Nathan Lynch nathanl at linux.ibm.com
Thu Aug 24 21:51:59 AEST 2023

Russell Currey <ruscur at russell.cc> writes:
> snowpatch has found a compiler error with this patch.
>    Error: papr_vpd.c:346:33: error: passing argument 2 of 'test_harness'
>    discards 'const' qualifier from pointer target type [-Werror=discarded-
>    qualifiers]
>       if (test_harness(t->function, t->description))
>                                     ^
>    In file included from papr_vpd.c:11:0:
>    /linux/tools/testing/selftests/powerpc/include/utils.h:35:5: note:
>    expected 'char *' but argument is of type 'const char * const'
>     int test_harness(int (test_function)(void), char *name);
>         ^

Thanks, this compiler warning will resolve when this code is built with
701ca3657d5 "selftests/powerpc: add const qualification where possible",
which is in powerpc/next.

More information about the Linuxppc-dev mailing list