lkml.org 
[lkml]   [2012]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 3/3] Convert mce_disabled
On 10/12/2012 05:26 PM, Borislav Petkov wrote:
> On Fri, Oct 12, 2012 at 04:20:40PM +0530, Naveen N. Rao wrote:
>> Hi Boris, Thanks for getting to this before I could!
>
> Ah ok, I thought you wasn't interested in doing this anymore :).

Sorry - just got sidetracked a bit, I'm afraid :)

>
>> I had a look but I still feel boolean is a better way to go. With
>> bool, we can get rid of the #defines above and more importantly, the
>> aux field in dev_ext_attribute since that is used in other places
>> too. Further, I suspect we'll still end up using the same or less
>> memory since we don't have that many boolean members within the MCA
>> code.
>
> My main intention was to have all those in a single struct and use a
> single store_bit/show_bit function.
>
> Sure, you can do bools but this'll still be single variables spread
> around in mce.c instead of one single struct mca_config which nicely
> encapsulates all the configuration we do in the MCA code.
>
> Or, you can modify the mca_config I have there and use bools and pass a
> pointer to each actual bool member in each DEVICE_BIT_ATTR invocation
> (and rename it to DEVICE_BOOL_ATTR). Yeah, that could work, unless I'm
> missing something else, of course.

Yes, this is what I had in mind. Though your code for use of bitfield is
nicely done, I felt use of boolean will fit better in this specific case.


Thanks,
Naveen



\
 
 \ /
  Last update: 2012-10-15 08:41    [W:0.064 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site