From: Andrew Morton <akpm@linux-foundation.org>
To: David Howells <dhowells@redhat.com>
Cc: flamingice@sourmilk.net, linville@tuxdriver.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix warnings on calls to P54P_READ() for which the result is discarded
Date: Sat, 12 Jul 2008 22:24:46 -0700 [thread overview]
Message-ID: <20080712222446.552f4069.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080711141443.14665.63279.stgit@warthog.procyon.org.uk>
On Fri, 11 Jul 2008 15:14:43 +0100 David Howells <dhowells@redhat.com> wrote:
> Fix warnings on calls to P54P_READ() for which the result is discarded because
> the side-effect of accessing hardware is what's of interest, not the result of
> performing the read.
>
> The warnings are of the form:
>
> drivers/net/wireless/p54/p54pci.c:55: warning: value computed is not used
hm, why aren't I seeing these?
> Casting to (void) gets rid of this.
This makes the ugly uglier. Would it fix the warnings if we were to do
-#define P54P_READ(r) (__force __le32)__raw_readl(&priv->map->r)
+static inline __le32 p54p_read(__le32 *addr)
+{
+ return (__force __le32)__raw_readl(addr);
+}
...
- P54P_READ(dev_int);
+ P54P_READ(&priv->map->dev_int);
or something along those lines?
Because the cpp trickery in there really isn't very nice.
prev parent reply other threads:[~2008-07-13 5:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 14:14 David Howells
2008-07-13 5:24 ` Andrew Morton [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=20080712222446.552f4069.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=flamingice@sourmilk.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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
Powered by JetHome