[PATCH v2] ARM: fix vdsomunge not to depend on glibc specific byteswap.h
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Oct 15 09:37:12 PDT 2015
On Thu, Oct 15, 2015 at 07:52:38AM +0200, H. Nikolaus Schaller wrote:
> ERROR: space prohibited before that close parenthesis ')'
> #46: FILE: arch/arm/vdso/vdsomunge.c:64:
> + (((unsigned short)(x) & (unsigned short)0xff00U) >> 8) ))
I have a pet hatred of too many parens. I also have a hatred of idiotic
casts. What about changing the above to one of:
(((x) & 0xff00) >> 8)
(((x) >> 8) & 0xff)
>
> ERROR: space prohibited before that close parenthesis ')'
> #53: FILE: arch/arm/vdso/vdsomunge.c:71:
> + (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) ))
and one of:
(((x) & 0xff000000) >> 24)
(((x) >> 24) & 0xff)
?
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel
mailing list