qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table


From: Michael S. Tsirkin
Subject: Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table
Date: Wed, 26 Jan 2022 02:41:34 -0500

On Tue, Jan 25, 2022 at 10:24:49AM -0600, Eric DeVolder wrote:
> And here is what the main snippet looks like with the above changes (a diff
> is quite messy):
> 
>     /*
>      * Macros for use with construction of the action instructions
>      */
> #define BUILD_READ_VALUE(width_in_bits) \
>     build_serialization_instruction_entry(table_instruction_data, \
>         action, INST_READ_REGISTER, 0, width_in_bits, \
>         bar0 + ERST_VALUE_OFFSET, 0)
> 
> #define BUILD_READ_VALUE_VALUE(width_in_bits, value) \
>     build_serialization_instruction_entry(table_instruction_data, \
>         action, INST_READ_REGISTER_VALUE, 0, width_in_bits, \
>         bar0 + ERST_VALUE_OFFSET, value)
> 
> #define BUILD_WRITE_REGISTER(width_in_bits, reg, value) \
>     build_serialization_instruction_entry(table_instruction_data, \
>         action, INST_WRITE_REGISTER, 0, width_in_bits, \
>         bar0 + reg, value)
> 
> #define BUILD_WRITE_REGISTER_VALUE(width_in_bits, reg, value) \
>     build_serialization_instruction_entry(table_instruction_data, \
>         action, INST_WRITE_REGISTER_VALUE, 0, width_in_bits, \
>         bar0 + reg, value)

Please, don't hide variable accesses in macros like that.
whatever is accessed should be part of a parameter.

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]