Commit 52ae18ac authored by Dan Williams's avatar Dan Williams

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: default avatarDavid Milburn <dmilburn@redhat.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 4eefd251
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment