Messages in this thread | | | From | Bart Van Assche <> | Subject | Re: [PATCH 2/3] scsi: check for equality of result byte values | Date | Tue, 12 Jun 2018 15:12:00 +0000 |
| |
On Tue, 2018-06-12 at 15:53 +0200, Johannes Thumshirn wrote: > - || status_byte(cmd->result) & > + || status_byte(cmd->result) == > CHECK_CONDITION)) {
Is "status_byte(cmd->result) == CHECK_CONDITION" short enough for a single line of code? Is the line splitting really necessary?
> - if (!(driver_byte(result) & DRIVER_SENSE) || > + if (!(driver_byte(result) == DRIVER_SENSE) ||
Please change (!(x == y)) into (x != y).
> - if ((driver_byte(result) & DRIVER_SENSE) && > + if ((driver_byte(result) == DRIVER_SENSE) &&
Please change (driver_byte(result) == DRIVER_SENSE) into driver_byte(result) == DRIVER_SENSE.
> - ((driver_byte(the_result) & DRIVER_SENSE) && > + ((driver_byte(the_result) == DRIVER_SENSE) &&
Same comment here.
> - if ((driver_byte(the_result) & DRIVER_SENSE) == 0) { > + if ((driver_byte(the_result) == DRIVER_SENSE) == 0) {
Please change (x == y) == 0 into x != y.
Thanks,
Bart.
| |