提交 52ae18ac 编写于 作者: D 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: NDavid Milburn <dmilburn@redhat.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 4eefd251
...@@ -250,9 +250,8 @@ struct isci_orom *isci_get_efi_var(struct pci_dev *pdev) ...@@ -250,9 +250,8 @@ struct isci_orom *isci_get_efi_var(struct pci_dev *pdev)
return NULL; return NULL;
} }
copy_len = min(evar->DataSize, copy_len = min_t(u16, evar->DataSize,
min(oem_hdr->len - sizeof(*oem_hdr), min_t(u16, oem_hdr->len - sizeof(*oem_hdr), sizeof(*rom)));
sizeof(*rom)));
memcpy(rom, (char *)evar->Data + sizeof(*oem_hdr), copy_len); memcpy(rom, (char *)evar->Data + sizeof(*oem_hdr), copy_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册