From: Matt_Domsch@Dell.com
To: linux-ia64@vger.kernel.org
Subject: RE: [Linux-ia64] Integer to Pointer Cast Warnings when Building 2
Date: Mon, 03 Jun 2002 14:48:31 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905630@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905629@msgid-missing>
> make[3]: Entering directory `/kernel/linux/drivers/scsi'
> megaraid.c: In function `megaraid_queue':
> megaraid.c:3805: warning: cast to pointer from integer of
> different size
This one is OK, albeit not obvious. That's inside an ioctl that can only be
called by a 32-bit user space application (no equivalent 64-bit app exists).
The code is:
char *user_area = NULL;
user_area = (char *)*((u32*)&pScb->SCpnt->cmnd[4]);
copy_to_user(user_area,...)
a 32-bit value which is a pointer inside a 32-bit application gets promoted
to a 64-bit pointer inside the ioctl so that copy_to_user can be used.
Thanks,
Matt
--
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#1 US Linux Server provider for 2001!
next prev parent reply other threads:[~2002-06-03 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-03 12:39 [Linux-ia64] Integer to Pointer Cast Warnings when Building 2.4.17 LAKSHMIPATHY,ARUN (HP-India,ex2)
2002-06-03 14:48 ` Matt_Domsch [this message]
2002-06-03 15:00 ` n0ano
2002-06-03 17:23 ` David Mosberger
2002-06-03 17:35 ` Matthew Wilcox
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=marc-linux-ia64-105590701905630@msgid-missing \
--to=matt_domsch@dell.com \
--cc=linux-ia64@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