From: Jean Sacren <sakiwit@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] kernel/sched.c: Fix array initialization typo
Date: Sun, 12 Jun 2011 16:01:16 -0600 [thread overview]
Message-ID: <20110612220116.GB12311@mail.gmail.com> (raw)
In-Reply-To: <20110612213549.GA21620@p183.telecom.by>
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Mon, 13 Jun 2011 00:35:49 +0300
>
> On Sun, Jun 12, 2011 at 03:31:07PM -0600, Jean Sacren wrote:
> > The fix makes certain so that the size of the initialized arrays doesn't
> > go beyond the boundary set by the array size of 40.
>
> Why would it possibly do that?
With that ',' comma, doesn't it imply there might be the 41st element in
the array? Despite the fact that that element is bogus.
Further, if the comma is there, what's the benefit? I know you're cool,
but is it cool in code that way as well?
>
> And it's not a typo.
What is it then?
>
> > @@ -1383,7 +1383,7 @@ static const int prio_to_weight[40] = {
> > /* 0 */ 1024, 820, 655, 526, 423,
> > /* 5 */ 335, 272, 215, 172, 137,
> > /* 10 */ 110, 87, 70, 56, 45,
> > - /* 15 */ 36, 29, 23, 18, 15,
> > + /* 15 */ 36, 29, 23, 18, 15
> > };
> >
> > /*
> > @@ -1401,7 +1401,7 @@ static const u32 prio_to_wmult[40] = {
> > /* 0 */ 4194304, 5237765, 6557202, 8165337, 10153587,
> > /* 5 */ 12820798, 15790321, 19976592, 24970740, 31350126,
> > /* 10 */ 39045157, 49367440, 61356676, 76695844, 95443717,
> > - /* 15 */ 119304647, 148102320, 186737708, 238609294, 286331153,
> > + /* 15 */ 119304647, 148102320, 186737708, 238609294, 286331153
> > };
--
Jean Sacren
next prev parent reply other threads:[~2011-06-12 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-12 21:31 [PATCH 1/1] kernel/sched.c: Fix array initialization typo Jean Sacren
2011-06-12 21:35 ` Alexey Dobriyan
2011-06-12 22:01 ` Jean Sacren [this message]
2011-06-12 23:09 ` Andy Isaacson
2011-06-12 23:59 ` Randy Dunlap
2011-06-13 0:51 ` Jean Sacren
2011-06-14 18:49 ` Valdis.Kletnieks
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=20110612220116.GB12311@mail.gmail.com \
--to=sakiwit@gmail.com \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox