Re: [PATCH V3 1/4] x86: acpi: define uncached page flag

Zhang, Jonathan Zhixiong
2015-06-12T23:49:33Z

On 6/12/2015 12:52 AM, Ingo Molnar wrote:
>
> * Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org> wrote:
>
>> From: "Jonathan (Zhixiong) Zhang" <zjzhang@codeaurora.org>
>>
>> This definition is used in APEI code when needing to map pages as
>> uncached.
>>
>> Signed-off-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
>> ---
>> arch/x86/include/asm/acpi.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
>> index 3a45668f6dc3..6afb27682b00 100644
>> --- a/arch/x86/include/asm/acpi.h
>> +++ b/arch/x86/include/asm/acpi.h
>> @@ -138,6 +138,10 @@ static inline void disable_acpi(void) { }
>>
>> #endif /* !CONFIG_ACPI */
>>
>> +#ifdef CONFIG_ACPI_APEI
>> +#define ARCH_APEI_PAGE_KERNEL_UC (PAGE_KERNEL_NOCACHE)
>> +#endif /*CONFIG_ACPI_APEI */
>
> - Why the tab?
>
> - Why the parentheses?
>
> - Why the closing comment block for a oneliner define? It's not like we forget
> what it's about.
>
> - When the missing space in the closing comment?
>
> That's 4 uglies in 3 lines of code, wow ...
>
> Thanks,
>
> Ingo
>
Thank you Ingo for the review. I agree that style is important.

--
Jonathan (Zhixiong) Zhang