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


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to