From 52ae18ac80fbdd268720b0daa27ac797a801500c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 25 Mar 2011 10:05:58 -0700 Subject: [PATCH] isci: fix a build warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Dan Williams --- drivers/scsi/isci/probe_roms.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c index 1697487f908c..2df8d8e5d5ea 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); -- 2.20.1