diff options
author | Don Brace <don.brace@pmcs.com> | 2015-11-05 00:51:08 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2015-11-09 20:34:20 +0300 |
commit | f2039b03290b3b1e0556b85b7018273e116d17c3 (patch) | |
tree | 96e831bb115a82dea81a04bd2292ba71677a395b /drivers/scsi/NCR_D700.c | |
parent | 0b9b7b6eecad03e0ba4290af7145e2c5d1f8ff13 (diff) | |
download | linux-f2039b03290b3b1e0556b85b7018273e116d17c3.tar.xz |
hpsa: correct check for non-disk devices
The driver is using two MACROs which seemingly are looking in
the wrong location for the device_flags returned from
CISS_REPORT_PHYS. Both MACROs, NON_DISK_PHYS_DEV and
PHYS_IOACCEL, are using the pointer returned from figure_lunaddrbytes
which is the address of the LUN.lunid element in
the extended CISS_REPORT_PHYS. But the MACROS are using offsets
beyond the range of the element (offset 17 of an 8 byte element).
These MACROs actually are looking at the correct location but
they fail static checker analysis. It also will not work
if any new elements are added to the extended LUN structure.
Change the code to use the structure elements directly
since this MACRO is only used in one location.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Justin Lindley <justin.lindley@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR_D700.c')
0 files changed, 0 insertions, 0 deletions