summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-25 10:05:58 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:00:36 -0700
commit52ae18ac80fbdd268720b0daa27ac797a801500c (patch)
tree0d7e5f7ee23468c682de39be9247354dceb86ac0 /drivers/scsi
parent4eefd2518aa04e1c69118252dc23e3444e694bc1 (diff)
downloadlinux-3.10-52ae18ac80fbdd268720b0daa27ac797a801500c.tar.gz
linux-3.10-52ae18ac80fbdd268720b0daa27ac797a801500c.tar.bz2
linux-3.10-52ae18ac80fbdd268720b0daa27ac797a801500c.zip
isci: fix a build warning
Use min_t to address: drivers/scsi/isci/probe_roms.c: In function ‘isci_get_efi_var’: drivers/scsi/isci/probe_roms.c:241: warning: comparison of distinct pointer types lacks a cast Reported-by: David Milburn <dmilburn@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/isci/probe_roms.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c
index 1697487f908..2df8d8e5d5e 100644
--- a/drivers/scsi/isci/probe_roms.c
+++ b/drivers/scsi/isci/probe_roms.c
@@ -250,9 +250,8 @@ struct isci_orom *isci_get_efi_var(struct pci_dev *pdev)
return NULL;
}
- copy_len = min(evar->DataSize,
- min(oem_hdr->len - sizeof(*oem_hdr),
- sizeof(*rom)));
+ copy_len = min_t(u16, evar->DataSize,
+ min_t(u16, oem_hdr->len - sizeof(*oem_hdr), sizeof(*rom)));
memcpy(rom, (char *)evar->Data + sizeof(*oem_hdr), copy_len);