Messages in this thread | | | Date | Thu, 6 Sep 2012 14:15:30 +0200 | From | Borislav Petkov <> | Subject | Re: [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
| |