lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] asm-generic/io.h: convert readX defines to functions
Date
On Monday 07 January 2013 16:34:59 Heiko Carstens wrote:
>
> E.g. readl is defined like this
>
> #define readl(addr) __le32_to_cpu(__raw_readl(addr))
>
> If there is a readl() call that doesn't check the return value
> this will cause a compile warning on big endian machines due to
> the __le32_to_cpu macro magic.
>
> E.g. code like this:
>
> readl(addr);
>
> will generate the following compile warning:
>
> warning: value computed is not used [-Wunused-value]
>
> Convert the defines to functions so we get rid of these warnings.
> With this patch we get rid of dozens of compile warnings on s390.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>

if you fix this:

> +#define readl readl
> +static inline u32 __raw_readl(const volatile void __iomem *addr)
> +{
> + return __le32_to_cpu(__raw_readl(addr));
> +}

to be called readl rather than __raw_readl

Arnd


\
 
 \ /
  Last update: 2013-01-07 17:21    [W:0.117 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site