Re: [PATCH] checkpatch: recognize FIXTURE_DATA() and FIXTURE_VARIANT() as types

From: Hong, Yifan

Date: Wed Nov 18 2026 - 13:48:24 EST


On Tue, Nov 17, 2026 at 5:37 PM Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> On Tue, 2026-11-17 at 22:05 +0000, HONG Yifan wrote:
> > tools/testing/selftests/kselftest_harness.h defines FIXTURE_DATA() and
> > FIXTURE_VARIANT() to expand to struct type specifiers
> > ("struct _test_data_##datatype_name" and
> > "struct _fixture_variant_##fixture_name").
>
> NAK. This sort of stuff needs to be externalized.

Thanks for the review. By "externalize", I assume you mean the pattern in
https://lore.kernel.org/all/e5a8da43e7c11525bafbda1ca69a8323614dd942.1472664220.git.joe@xxxxxxxxxxx/
commit bf1fa1dae68e ("checkpatch: externalize the structs that should be const")
so that I should put an autoloaded file listing function-like macros
that expand to types. Is that what you mean?

Assuming that's the case, I'll prepare a v2 of the patch.