* [PATCH] 2.5.6 compile warnings in ide-scsi.c
@ 2002-03-10 16:45 Mikael Pettersson
0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2002-03-10 16:45 UTC (permalink / raw)
To: linux-kernel
In kernel 2.5.6, compilation of ide-scsi.c generates some rather
unpleasant looking warnings:
ide-scsi.c: In function `idescsi_end_request':
ide-scsi.c:293: warning: comparison of distinct pointer types lacks a cast
ide-scsi.c: In function `get_timeout':
ide-scsi.c:310: warning: comparison of distinct pointer types lacks a cast
They turned out to be caused by type mismatches in uses of the
min() and max() macros. Fix below.
/Mikael
--- linux-2.5.6/drivers/scsi/ide-scsi.c.~1~ Sat Mar 9 12:53:13 2002
+++ linux-2.5.6/drivers/scsi/ide-scsi.c Sun Mar 10 17:14:12 2002
@@ -290,7 +290,7 @@
if (!test_bit(PC_WRITING, &pc->flags) && pc->actually_transferred && pc->actually_transferred <= 1024 && pc->buffer) {
printk(", rst = ");
scsi_buf = pc->scsi_cmd->request_buffer;
- hexdump(scsi_buf, min(16, pc->scsi_cmd->request_bufflen));
+ hexdump(scsi_buf, min(16U, pc->scsi_cmd->request_bufflen));
} else printk("\n");
}
}
@@ -307,7 +307,7 @@
static inline unsigned long get_timeout(idescsi_pc_t *pc)
{
- return max(WAIT_CMD, pc->timeout - jiffies);
+ return max((unsigned long)WAIT_CMD, pc->timeout - jiffies);
}
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-10 16:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-10 16:45 [PATCH] 2.5.6 compile warnings in ide-scsi.c Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®