[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111013191448.GD3064@aftab>
Date: Thu, 13 Oct 2011 21:14:48 +0200
From: Borislav Petkov <bp@...64.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Niklas Söderlund <niso@....se>,
"mchehab@...hat.com" <mchehab@...hat.com>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i7core_edac: fix erroneous size of static array
On Thu, Oct 13, 2011 at 03:03:20PM -0400, Luck, Tony wrote:
> > - static int cols[8] = {
> > + static int cols[4] = {
>
> Why are these arrays "static"? Does that generate better code than
> dynamic initialization?
They look like lookup arrays for count of things based on bit settings
and as such they should be static because they don't ... change :). If
they were dynamic, then inlining them in every function callsite would
be not cool.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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