[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DE32E38.7010608@jp.fujitsu.com>
Date: Mon, 30 May 2011 14:42:16 +0900
From: Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 03/12] mce-severity: cleanup severity table
(2011/05/27 16:54), Ingo Molnar wrote:
>
> * Borislav Petkov <bp@...en8.de> wrote:
>
>>> - BITSET(
>>> - MCI_STATUS_PCC,
>>> - PANIC, "Processor context corrupt"
>>> + MCESEV(
>>> + PANIC, "Processor context corrupt",
>>> + BITSET(MCI_STATUS_PCC)
>>> ),
>>
>> I'm still wondering whether using the gcc struct assignment syntax could
>> make those much more readable instead of changing the macro inclusion:
>>
>> {
>> .sev = MCE_PANIC_SEVERITY,
>> .msg = "Processor context corrupt",
>> .mask = MCI_STATUS_PCC,
>> .result = MCI_STATUS_PCC,
>> },
>> ...
>
> Hidetoshi's version was already an improvement over what we have
> currently (what we have now is largely unreadable), but your variant
> looks even more readable and isnt all that much longer either.
>
> So, the case for macros is where the initialization can be compressed
> into a single *readable* line. If that cannot be done then the least
> obfuscated version is generally the better one.
Maybe in later we can have another patch to make this table to use
the gcc's syntax if it is really required. And also it would worth
considering to re-implement this severity-leveling without the table.
Since this is a part of "minor" change set and I still like my version
with existing packed conditions, so at the moment I'd like to keep this
patch as a non-intrusive change.
Thanks,
H.Seto
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists