[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130208225727.GZ17833@n2100.arm.linux.org.uk>
Date: Fri, 8 Feb 2013 22:57:27 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: "H. Peter Anvin" <hpa@...ux.intel.com>,
kbuild test robot <fengguang.wu@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: sound/pci/asihpi/hpioctl.c:125:6: warning: cast to pointer
from integer of different size
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists