public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -v2] x86: allocate cpumask during check irq vectors
Date: Mon, 27 Jan 2014 08:14:10 +0100	[thread overview]
Message-ID: <20140127071410.GA19617@gmail.com> (raw)
In-Reply-To: <eb93bdba-d16d-4a85-ae40-f265b1db5ed4@email.android.com>


* H. Peter Anvin <hpa@zytor.com> wrote:

> I strongly disagree with putting variables in file scope when 
> function scope will do, [...]

Yes, you are right that single-use file scope statics 'could' be moved 
function local and are syntactically superior because in that case 
other functions cannot make use of it.

But I also have very good (and unfixable and thus stronger) reasons to 
object to statics inside local variables: more than once I personally 
missed 'hidden statics' during review, in one case it even slipped 
into a commit, so it's not a practice I want to encourage in any shape 
or form (even if the 'rule' is to have a big fat comment, people will 
just see the function local static and emulate it without the 
comment), for code I maintain.

It's not about you, it's about me and other reviewers: I've seen 
statics slipping past other reviewers as well. So it's the lesser of 
two evils. Can you accept that reasoning?

Thanks,

	Ingo

      parent reply	other threads:[~2014-01-27  7:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25  0:59 [PATCH -v2] x86: allocate cpumask during check irq vectors Yinghai Lu
2014-01-25  8:02 ` Ingo Molnar
2014-01-26 12:22   ` Prarit Bhargava
2014-01-26 13:32     ` Ingo Molnar
2014-01-26 19:19       ` Prarit Bhargava
2014-01-26 20:21         ` Ingo Molnar
2014-01-26 20:23           ` H. Peter Anvin
2014-01-26 20:27             ` Ingo Molnar
2014-01-26 20:29               ` H. Peter Anvin
2014-01-26 21:46                 ` Prarit Bhargava
2014-01-27  7:14                 ` Ingo Molnar [this message]

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=20140127071410.GA19617@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=prarit@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=yinghai@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