Skip to content

Commit 4525c87

Browse files
committed
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 8ae1787 ("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 3e6efab ("scsi: qla2xxx: Fix reset of MPI firmware"), very similarly to how commit cbb01c2 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") exposed the same problem in another place, and caused that commit 8ae1787. 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>
1 parent bf9a76a commit 4525c87

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/scsi/qla2xxx/qla_tmpl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,10 +1001,8 @@ qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
10011001
{
10021002
ulong flags = 0;
10031003

1004-
#ifndef __CHECKER__
10051004
if (!hardware_locked)
10061005
spin_lock_irqsave(&vha->hw->hardware_lock, flags);
1007-
#endif
10081006
if (!vha->hw->mpi_fw_dump) {
10091007
ql_log(ql_log_warn, vha, 0x02f3, "-> mpi_fwdump no buffer\n");
10101008
} else {
@@ -1050,10 +1048,8 @@ qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
10501048
}
10511049

10521050
bailout:
1053-
#ifndef __CHECKER__
10541051
if (!hardware_locked)
10551052
spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
1056-
#endif
10571053
}
10581054

10591055
void

0 commit comments

Comments
 (0)