lkml.org 
[lkml]   [2014]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] x86: allocate cpumask during check irq vectors

* 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


\
 
 \ /
  Last update: 2014-01-26 22:21    [W:0.091 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site