* [PATCH] hptiop: fix type mismatch warning
@ 2007-10-24 10:34 Jeff Garzik
0 siblings, 0 replies; only message in thread
From: Jeff Garzik @ 2007-10-24 10:34 UTC (permalink / raw)
To: linux-scsi; +Cc: Andrew Morton, LKML
drivers/scsi/hptiop.c: In function 'hptiop_host_request_callback':
drivers/scsi/hptiop.c:378: warning: comparison of distinct pointer types lacks a cast
drivers/scsi/hptiop.c:378: warning: comparison of distinct pointer types lacks a cast
Use min_t(size_t, ...) to fix.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 0844331..7fc532b 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -376,7 +376,7 @@ static void hptiop_host_request_callback(struct hptiop_hba *hba, u32 _tag)
memset(&scp->sense_buffer,
0, sizeof(scp->sense_buffer));
memcpy(&scp->sense_buffer, &req->sg_list,
- min(sizeof(scp->sense_buffer),
+ min_t(size_t, sizeof(scp->sense_buffer),
le32_to_cpu(req->dataxfer_length)));
break;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-24 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 10:34 [PATCH] hptiop: fix type mismatch warning Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).