lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Jan 2014 16:46:38 -0500
From:	Prarit Bhargava <prarit@...hat.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Ingo Molnar <mingo@...nel.org>, Yinghai Lu <yinghai@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -v2] x86: allocate cpumask during check irq vectors



On 01/26/2014 03:29 PM, H. Peter Anvin wrote:
> 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@...nel.org> wrote:
>>
>> * H. Peter Anvin <hpa@...or.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.

Okay, thanks for the input -- I'll put something together and test.

P.

>>
>> Thanks,
>>
>> 	Ingo
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ