Re: [PATCH] aic94xx: fix handling of default CTRL-A settings

From: Paul Bolle
Date: Mon Oct 29 2012 - 06:42:13 EST


On Tue, 2012-09-25 at 14:07 +0200, Paul Bolle wrote:
> Compiling aic94xx_sds.o (part of the aic94xx driver) triggers this GCC
> warning:
> drivers/scsi/aic94xx/aic94xx_sds.c: In function 'asd_read_flash':
> drivers/scsi/aic94xx/aic94xx_sds.c:597:21: warning: 'offs' may be used uninitialized in this function [-Wmaybe-uninitialized]
> drivers/scsi/aic94xx/aic94xx_sds.c:985:6: note: 'offs' was declared here
>
> This warning can be traced back to asd_find_flash_de(). If it fails to
> find a FLASH_DE_CTRL_A_USER entry it will return without setting 'offs'.
> And that will leave 'offs' uninitialized when asd_read_flash_seg() is
> called a little later.
>
> But that call of asd_read_flash_seg() isn't needed in that case.
> Everything this code cares about can already be found in the "default
> CTRL-A user settings section" that was created in the error path. So
> let's just jump over that call (and all other unneeded code) after
> creating that section.
>
> Signed-off-by: Paul Bolle <pebolle@xxxxxxxxxx>
> ---
> 0) I noticed this warning while building v3.6-rc7 on current Fedora
> 17, using Fedora's default config.

And, again, identical warnings can be seen while building v3.7-rc3.
What's the status of my patch? Did anyone found some time to have a look
at it?


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/