[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
- [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, (continued)
- [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, Eric DeVolder, 2022/01/24
- Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, Eric DeVolder, 2022/01/25
- Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, Michael S. Tsirkin, 2022/01/25
- Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, Ani Sinha, 2022/01/26
- Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table, Eric DeVolder, 2022/01/26
- Re: [PATCH v13 06/10] ACPI ERST: build the ACPI ERST table,
Michael S. Tsirkin <=
[PATCH v13 10/10] ACPI ERST: step 6 of bios-tables-test.c, Eric DeVolder, 2022/01/24