From: Arnd Bergmann <arnd@arndb.de>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gerald Schaefer <geraldsc@de.ibm.com>,
Sebastian Ott <sebott@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] asm-generic/io.h: convert readX defines to functions
Date: Mon, 07 Jan 2013 15:42:38 +0000 [thread overview]
Message-ID: <12944963.pK1utZClTO@wuerfel> (raw)
In-Reply-To: <20130107153459.GA6898@osiris>
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
next prev parent reply other threads:[~2013-01-07 15:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 15:34 [PATCH] asm-generic/io.h: convert readX defines to functions Heiko Carstens
2013-01-07 15:42 ` Arnd Bergmann [this message]
2013-01-07 16:09 ` Heiko Carstens
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=12944963.pK1utZClTO@wuerfel \
--to=arnd@arndb.de \
--cc=geraldsc@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sebott@linux.vnet.ibm.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