Skip to content
Commit 287f7965 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen
Browse files

scsi: nsp32: fix logic bug in error handling



gcc-8 points out a logic error that has existed since the start of the
git history:

drivers/scsi/nsp32.c: In function 'nsp32_selection_autoscsi':
drivers/scsi/nsp32.c:607:27: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
  if(((phase & BUSMON_BSY) == 1) || (phase & BUSMON_SEL) == 1) {
                           ^~

Presumably the author intended to check if one of two bits was set, so
that's what I'm changing the code to. This will obviously change the
behavior of the code, hopefully to do the right thing, but I have not
tested this or checked if the new "(phase & BUSMON_BSY) || (phase &
BUSMON_SEL)" condition should indeed be treated as a fatal error.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarGOTO Masanori <gotom@debian.or.jp>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3e351275
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment