On 26.01.2026 11:43, Oleksii Kurochko wrote:
> On 1/26/26 11:09 AM, Jan Beulich wrote:
>> On 26.01.2026 09:38, Oleksii Kurochko wrote:
>>> +#define X(name, csr, fmt, ...) \
>>> +do { \
>>> + unsigned long v = csr_read(csr); \
>>> + printk("\t %-10s: %016lx" fmt, #name, v, ##__VA_ARGS__); \
>>> +} while (0);
>>> +
>>> + CSR_LIST
>> Same remarks here as above. The issue is actually worse here, as CSR_LIST
>> uses "v" which it isn't passed.
>
> I will declare local variable v in dump_csrs() and use it. Considering that
> this macros is declared and used only inside this function I think I can
> not pass it to X macro.
Yes, that should indeed be fine.
Jan