From: Borislav Petkov <bp@amd64.org>
To: "Niklas Söderlund" <niso@kth.se>
Cc: "mchehab@redhat.com" <mchehab@redhat.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i7core_edac: fix erroneous size of static array
Date: Thu, 13 Oct 2011 20:56:56 +0200 [thread overview]
Message-ID: <20111013185656.GC3064@aftab> (raw)
In-Reply-To: <1318530294-6829-1-git-send-email-niso@kth.se>
On Thu, Oct 13, 2011 at 02:24:54PM -0400, Niklas Söderlund wrote:
> Signed-off-by: Niklas Söderlund <niso@kth.se>
> ---
> drivers/edac/i7core_edac.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
> index 70ad892..e0f6096 100644
> --- a/drivers/edac/i7core_edac.c
> +++ b/drivers/edac/i7core_edac.c
> @@ -441,7 +441,7 @@ static inline int numrow(u32 row)
>
> static inline int numcol(u32 col)
> {
> - static int cols[8] = {
> + static int cols[4] = {
> 1 << 10, 1 << 11, 1 << 12, -EINVAL,
> };
Even better,
you could completely remove the number in the [] since the {}
initializer contains all array elements already. In this and the
remaining arrays in those small inline functions.
--
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
next prev parent reply other threads:[~2011-10-13 18:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 18:24 [PATCH] i7core_edac: fix erroneous size of static array Niklas Söderlund
2011-10-13 18:56 ` Borislav Petkov [this message]
2011-10-13 19:03 ` Luck, Tony
2011-10-13 19:14 ` Borislav Petkov
2011-10-13 20:04 ` Mauro Carvalho Chehab
2011-10-13 20:03 ` Niklas Söderlund
2011-10-13 20:06 ` Mauro Carvalho Chehab
2011-10-13 20:52 ` [PATCHv2] " Niklas Söderlund
2012-01-29 1:26 ` Niklas Söderlund
2012-01-29 2:01 ` Jesper Juhl
2012-01-29 22:04 ` [PATCHv3] " Niklas Söderlund
2012-01-29 22:14 ` Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111013185656.GC3064@aftab \
--to=bp@amd64.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=niso@kth.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.