From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>
Cc: linux-scsi@vger.kernel.org, Harry Yang <Harry.Yang@pmcs.com>,
Vishwanath Maram <Vishwanath.Maram@pmcs.com>,
sakthivel.sk@hcl.com, Rich Bono <Rich.Bono@pmcs.com>,
Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com>
Subject: Re: [PATCH V4 2/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Date: Thu, 02 May 2013 22:59:03 -0700 [thread overview]
Message-ID: <1367560743.24627.5.camel@dabdike> (raw)
In-Reply-To: <E5DEE6F468524847995699AD11E80885013304BA@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
On Thu, 2013-05-02 at 19:26 -0700, Anand Kumar Santhanam wrote:
> James,
>
> Can you pls let us know the warning flags you are including in your
> makefile such that we can check from our end.
> Obviously it looks like we did not use -Warray-bounds in this case.
Oh good grief, please stop wasting my time. You have the definition
here in your patch:
> + u32 rsvd1[2];
And then you use it as:
> + pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[0] =
> + pm8001_mr32(address, 0x38);
> + pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[1] =
> + pm8001_mr32(address, 0x3C);
> + pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[2] =
> + pm8001_mr32(address, 0x40);
That last one goes over the array bounds because an array declared as
rsvdl1[2] only has two elements: 0 and 1 ... this isn't rocket science
or esoteric compiler flags, this is basic C.
Stop quibbling and fix it, please.
James
next prev parent reply other threads:[~2013-05-03 5:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 18:25 [PATCH V4 2/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC Anand
2013-05-02 22:12 ` James Bottomley
2013-05-03 2:26 ` Anand Kumar Santhanam
2013-05-03 5:59 ` James Bottomley [this message]
2013-05-06 16:48 ` Anand Kumar Santhanam
2013-05-06 18:27 ` James Bottomley
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=1367560743.24627.5.camel@dabdike \
--to=james.bottomley@hansenpartnership.com \
--cc=AnandKumar.Santhanam@pmcs.com \
--cc=Harry.Yang@pmcs.com \
--cc=Rich.Bono@pmcs.com \
--cc=Sangeetha.Gnanasekaran@pmcs.com \
--cc=Vishwanath.Maram@pmcs.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sakthivel.sk@hcl.com \
/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