mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Tony Luck <tony.luck@intel.com>,
	andi@firstfloor.org, gong.chen@linux.intel.com,
	ananth@in.ibm.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de,
	gregkh@suse.de, linux-edac@vger.kernel.org
Subject: Re: [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure
Date: Thu, 6 Sep 2012 14:15:30 +0200	[thread overview]
Message-ID: <20120906121530.GB550@aftab.osrc.amd.com> (raw)
In-Reply-To: <5048473F.9070704@linux.vnet.ibm.com>

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

  reply	other threads:[~2012-09-06 12:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 10:21 [PATCH 0/3] x86:mce: Some cleanups and bios-set CMCI thresholds Naveen N. Rao
2012-09-05 10:21 ` [PATCH 1/3] x86/mce: Make sysfs tunables available globally across all cpus Naveen N. Rao
2012-09-05 10:32   ` [PATCH] [mcelog] Start using the new sysfs tunables location Naveen N. Rao
2012-09-05 18:47     ` Andi Kleen
2012-09-05 19:09       ` Tony Luck
2012-09-06  6:40         ` Naveen N. Rao
2012-09-06 12:28         ` Andi Kleen
2012-09-06 12:34           ` Naveen N. Rao
2012-09-06 12:51             ` Alan Cox
2012-09-06 13:21             ` Andi Kleen
2012-09-05 10:22 ` [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure Naveen N. Rao
2012-09-05 17:15   ` Joe Perches
2012-09-05 18:56   ` Tony Luck
2012-09-06  6:48     ` Naveen N. Rao
2012-09-06 12:15       ` Borislav Petkov [this message]
2012-09-05 10:22 ` [PATCH 3/3] x86/mce: Honour bios-set CMCI threshold Naveen N. Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120906121530.GB550@aftab.osrc.amd.com \
    --to=bp@amd64.org \
    --cc=ananth@in.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=gong.chen@linux.intel.com \
    --cc=gregkh@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome