Re: [PATCH v5 2/2] selftests/riscv: Add Zicbop prefetch test
From: Yao Zihong
Date: Thu Nov 20 2025 - 06:25:24 EST
Hi Andrew,
On Tue, 18 Nov 2025 10:45:43 -0600, Andrew Jones wrote:
> I would have written it like below to avoid four redundant lines
>
> case 'm': case 'z':
> tests[opt == 'm' ? TEST_NO_ZICBOM : TEST_NO_ZICBOZ].enabled = true;
> tests[TEST_NO_CBO_INVAL].enabled = true;
> rc = sigaction(SIGILL, &act, NULL);
> assert(rc == 0);
> break;
I'll apply this style pattern in future patches, or in a v6 if we end up
needing one.
Thanks,
Zihong