From: Vivek Goyal <vgoyal@redhat.com>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>,
Moyer Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH] cfq-iosched: Fix a gcc 4.5 warning and put some comments
Date: Fri, 22 Oct 2010 09:31:01 -0400 [thread overview]
Message-ID: <20101022133101.GA7020@redhat.com> (raw)
In-Reply-To: <4CC1414B.8070102@fusionio.com>
On Fri, Oct 22, 2010 at 09:46:19AM +0200, Jens Axboe wrote:
> On 2010-10-21 20:24, Vivek Goyal wrote:
> > - Andi encountedred following warning with gcc 4.5
> >
> > linux/block/cfq-iosched.c: In function ‘cfq_dispatch_requests’:
> > linux/block/cfq-iosched.c:2156:3: warning: array subscript is above array
> > bounds
> >
> > - Warning happens due to following code.
> >
> > slice = group_slice * count /
> > max_t(unsigned, cfqg->busy_queues_avg[cfqd->serving_prio],
> > cfq_group_busy_queues_wl(cfqd->serving_prio, cfqd, cfqg));
> >
> > gcc is complaining about cfqg->busy_queues_avg[] being indexed by CFQ
> > prio classes (RT, BE and IDLE) while the array size is only 2.
> >
> > - At run time, we never access cfqg->busy_queues_avg[IDLE] and return from
> > function before this code hits.
> >
> > - To fix warning increase the array size though it will remain unused. This
> > patch also puts some comments to clarify some of the confusions.
> >
> > - I have taken Jens's patch and modified it a bit.
> >
> > - Compile tested with gcc 4.4 and boot tested. I don't have gcc 4.5
> > running, Andi can you please test it with gcc 4.5 to make sure it
> > worked.
> >
> > Reported-by: Andi Kleen <ak@linux.intel.com>
> > Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> > Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> Thanks, I'll put this one in. BTW, you can't just add a signed-off-by
> from me (or anyone else, for that matter), they have to be provided
> explicitly by each individual.
Ok, sorry about that.
So in general, if I happen to pick somebody's patch, modify it and repost
it, how do I reflect the Signed-off-by of original author.
Thanks
Vivek
next prev parent reply other threads:[~2010-10-22 13:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 18:24 [PATCH] cfq-iosched: Fix a gcc 4.5 warning and put some comments Vivek Goyal
2010-10-21 20:36 ` Jeff Moyer
2010-10-22 7:46 ` Jens Axboe
2010-10-22 13:31 ` Vivek Goyal [this message]
2010-10-22 14:04 ` Jens Axboe
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=20101022133101.GA7020@redhat.com \
--to=vgoyal@redhat.com \
--cc=ak@linux.intel.com \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.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 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.