Skip to content

Commit

Permalink
[SCSI] atari_NCR5380, sun3_NCR5380: operator precedence fix
Browse files Browse the repository at this point in the history
SR_REQ is defined 0x20, but bitanding has no effect because '!' has a higher
priority than '&'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Roel Kluin authored and James Bottomley committed Jan 12, 2008
1 parent 0033bb4 commit 3be38e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/atari_NCR5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ static int do_abort(struct Scsi_Host *host)
* the target sees, so we just handshake.
*/

while (!(tmp = NCR5380_read(STATUS_REG)) & SR_REQ)
while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ))
;

NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp));
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/sun3_NCR5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ static int do_abort (struct Scsi_Host *host)
* the target sees, so we just handshake.
*/

while (!(tmp = NCR5380_read(STATUS_REG)) & SR_REQ);
while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ));

NCR5380_write(TARGET_COMMAND_REG, PHASE_SR_TO_TCR(tmp));

Expand Down

0 comments on commit 3be38e7

Please sign in to comment.