]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: remove incorrect sparse #ifdef
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Oct 2020 22:45:22 +0000 (15:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Oct 2020 22:45:22 +0000 (15:45 -0700)
commit738953ea4b9678fad226b59f7c65d0219ff096ed
tree9d79fe81bdd401cd890a01e98368bd2dca2689a3
parent22eaed19312053278654e25f5bc0c6937bd03f8a
scsi: qla2xxx: remove incorrect sparse #ifdef

The code to try to shut up sparse warnings about questionable locking
didn't shut up sparse: it made the result not parse as valid C at all,
since the end result now has a label with no statement.

The proper fix is to just always lock the hardware, the same way Bart
did in commit 3937eb97fde1 ("scsi: qla2xxx: Simplify the functions for
dumping firmware").  That avoids the whole problem with having locking
that is not statically obvious.

But in the meantime, just remove the incorrect attempt at trying to
avoid a sparse warning that just made things worse.

This was exposed by commit 9d18f00a9116 ("scsi: qla2xxx: Fix reset of
MPI firmware"), very similarly to how commit b01ee873db94 ("scsi:
qla2xxx: Fix MPI failure AEN (8200) handling") exposed the same problem
in another place, and caused that commit 3937eb97fde1.

Please don't add code to just shut up sparse without actually fixing
what sparse complains about.

Reported-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Arun Easi <aeasi@marvell.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/qla2xxx/qla_tmpl.c