On 10/21/19 11:53 AM, Hannes Reinecke wrote:
Instead of returning the linux-special status (which is shifted by 1 to the right) change the status_byte() macro to return the correct SCSI standard status. And audit all callers to handle this change. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/scsi/53c700.c | 6 +++--- drivers/scsi/NCR5380.c | 2 +- drivers/scsi/arm/acornscsi.c | 10 ++++----- drivers/scsi/arm/fas216.c | 10 ++++----- drivers/scsi/dc395x.c | 8 +++----- drivers/scsi/scsi.c | 2 +- drivers/scsi/scsi_error.c | 48 ++++++++++++++++++++++---------------------- drivers/scsi/scsi_lib.c | 2 +- drivers/scsi/sg.c | 4 ++-- include/scsi/scsi.h | 2 +- 10 files changed, 46 insertions(+), 48 deletions(-) diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 5339baadc082..de52632c6022 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -207,7 +207,7 @@ static inline int scsi_is_wlun(u64 lun) * host_byte = set by low-level driver to indicate status. * driver_byte = set by mid-level. */ -#define status_byte(result) (((result) >> 1) & 0x7f) +#define status_byte(result) (((result)) & 0xff)
drop the now unnecessary additional parentheses pair around (result)?: +#define status_byte(result) ((result) & 0xff)
#define msg_byte(result) (((result) >> 8) & 0xff) #define host_byte(result) (((result) >> 16) & 0xff) #define driver_byte(result) (((result) >> 24) & 0xff)
-- Mit freundlichen Gruessen / Kind regards Steffen Maier Linux on IBM Z Development https://www.ibm.com/privacy/us/en/ IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Matthias Hartmann Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294