[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20071024103409.GA31302@havoc.gtf.org>
Date: Wed, 24 Oct 2007 06:34:09 -0400
From: Jeff Garzik <jeff@...zik.org>
To: linux-scsi@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] hptiop: fix type mismatch warning
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@...hat.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists