Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389AbaAZVqy (ORCPT ); Sun, 26 Jan 2014 16:46:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48561 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbaAZVqx (ORCPT ); Sun, 26 Jan 2014 16:46:53 -0500 Message-ID: <52E5823E.1080906@redhat.com> Date: Sun, 26 Jan 2014 16:46:38 -0500 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 MIME-Version: 1.0 To: "H. Peter Anvin" CC: Ingo Molnar , Yinghai Lu , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH -v2] x86: allocate cpumask during check irq vectors References: <1390611565-18709-1-git-send-email-yinghai@kernel.org> <20140125080232.GA20935@gmail.com> <52E4FE02.2020004@redhat.com> <20140126133203.GA1370@gmail.com> <52E55FB1.4060404@redhat.com> <20140126202140.GB8224@gmail.com> <4f0b30ff-6adb-46f5-bad4-ed42956e2a39@email.android.com> <20140126202749.GA10254@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wrote: >> >> * H. Peter Anvin 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/