From: Mikael Pettersson <mikpe@csd.uu.se>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.6 compile warnings in ide-scsi.c
Date: Sun, 10 Mar 2002 17:45:35 +0100 (MET) [thread overview]
Message-ID: <200203101645.RAA02322@harpo.it.uu.se> (raw)
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);
}
/*
reply other threads:[~2002-03-10 16:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200203101645.RAA02322@harpo.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®