2019-05-31 03:37:39

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the scsi tree

Hi all,

After merging the scsi tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_work':
drivers/scsi/ibmvscsi/ibmvscsi.c:2151:5: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (rc) {
^
drivers/scsi/ibmvscsi/ibmvscsi.c:2121:6: note: 'rc' was declared here
int rc;
^~

Introduced by commit

035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum action states")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-06-03 20:31:05

by Tyrel Datwyler

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the scsi tree

On 05/30/2019 08:36 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the scsi tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_work':
> drivers/scsi/ibmvscsi/ibmvscsi.c:2151:5: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (rc) {
> ^
> drivers/scsi/ibmvscsi/ibmvscsi.c:2121:6: note: 'rc' was declared here
> int rc;
> ^~
>
> Introduced by commit
>
> 035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum action states")
>

Oof, looks like I didn't compile with pedantic enough options, or just didn't
notice the warning. Declaration should be "int rc = 0;". I can send a follow on
patch.

-Tyrel

2019-06-03 23:39:30

by Tyrel Datwyler

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the scsi tree

On 05/30/2019 08:36 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the scsi tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_work':
> drivers/scsi/ibmvscsi/ibmvscsi.c:2151:5: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (rc) {
> ^
> drivers/scsi/ibmvscsi/ibmvscsi.c:2121:6: note: 'rc' was declared here
> int rc;
> ^~
>
> Introduced by commit
>
> 035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum action states")
>

Looks like somebody else noticed the warning and a proposed fix was already sent
out.

-Tyrel