From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
kbuild test robot <fengguang.wu@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: sound/pci/asihpi/hpioctl.c:125:6: warning: cast to pointer from integer of different size
Date: Fri, 8 Feb 2013 22:57:27 +0000 [thread overview]
Message-ID: <20130208225727.GZ17833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130208185057.GK9135@intel.com>
On Fri, Feb 08, 2013 at 08:50:57PM +0200, Ville Syrjälä wrote:
> struct {
> uint8_t sika1;
> uint16_t sika2;
> uint32_t sika4;
> uint64_t sika8;
Note - you also need to check what the behaviour is with a pointer type
too - that's the one that gets ARM if you try this. My test set on ARM
was:
int test_8(unsigned char *v, unsigned char *p)
{
return get_user(*v, p);
}
int test_16(unsigned short *v, unsigned short *p)
{
return get_user(*v, p);
}
int test_32(unsigned int *v, unsigned int *p)
{
return get_user(*v, p);
}
int test_32_constp(unsigned int *v, const unsigned int *p)
{
return get_user(*v, p);
}
int test_64(unsigned long long *v, unsigned long long *p)
{
return get_user(*v, p);
}
int test_64_narrow(unsigned long *v, unsigned long long *p)
{
return get_user(*v, p);
}
int test_ptr(unsigned int **v, unsigned int **p)
{
return get_user(*v, p);
}
int test_wrong(char **v, const char **p)
{
return get_user(*v, p);
}
All but the last should build cleanly and correctly. The last should
issue a warning.
prev parent reply other threads:[~2013-02-08 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51143ca4.bNX7TobZ2rDrz0zj%fengguang.wu@intel.com>
2013-02-08 2:19 ` H. Peter Anvin
2013-02-08 15:28 ` Russell King - ARM Linux
2013-02-08 17:06 ` H. Peter Anvin
2013-02-08 18:50 ` Ville Syrjälä
2013-02-08 22:57 ` Russell King - ARM Linux [this message]
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=20130208225727.GZ17833@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=fengguang.wu@intel.com \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ville.syrjala@linux.intel.com \
/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®