lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure
On Thu, Sep 06, 2012 at 12:18:31PM +0530, Naveen N. Rao wrote:
> >I know I'm contradicting the feedback you got from Borislav here, but
> >is this code churn really worth it to save 40 bytes? I don't think
> >so.

Well, to answer Tony's question, I wanted to have all those config
booleans at the beginning of mce.c packed tightly together as a
single-bit bool values in a config-like struct so that they don't
scatter all over the place and grow out of proportion with more features
being added. So actually I'm willing to swallow the slight increase in
code size for better/more clear code.

> Hmm.. I think I agree. I don't see a good way to get rid of the
> individual getters and setters without adding some more code churn.
> I guess using boolean would be better. Boris?

Yes, it would be worth to try to add a DEVICE_BOOL_ATTR which introduce
a setter/getter flavour for bools and then use that for all.

Thanks.

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551


\
 
 \ /
  Last update: 2012-09-06 15:42    [W:0.044 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site