Messages in this thread | | | Subject | Re: [PATCH -v2] x86: allocate cpumask during check irq vectors | From | "H. Peter Anvin" <> | Date | Sun, 26 Jan 2014 12:29:49 -0800 |
| |
I strongly disagree with putting variables in file scope when function scope will do, but I do like to see static variables before automatics. Anyway, this is bikeshedding.
Ingo Molnar <mingo@kernel.org> wrote: > >* H. Peter Anvin <hpa@zytor.com> wrote: > >> s/global/static/, with a big loud comment why it is okay. > >It would be a global no matter which form we use, but for >maintainability reasons I generally prefer a static put right before >the function that uses it: > > static cpumask_t mask; > > static func(...) > { > } > >That makes it really apparent that it's a global - statics are easily >missed when hiding amongst local variables. > >Thanks, > > Ingo
-- Sent from my mobile phone. Please pardon brevity and lack of formatting.
| |