From: Jeff Garzik <jeff@garzik.org>
To: linux-scsi@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] hptiop: fix type mismatch warning
Date: Wed, 24 Oct 2007 06:34:09 -0400 [thread overview]
Message-ID: <20071024103409.GA31302@havoc.gtf.org> (raw)
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;
reply other threads:[~2007-10-24 10:34 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=20071024103409.GA31302@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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®