lkml.org 
[lkml]   [2008]   [Jul]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 12 Jul 2008 22:24:46 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] Fix warnings on calls to P54P_READ() for which the result is discarded
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.


\
 
 \ /
  Last update: 2008-07-13 07:29    [from the cache]
©2003-2008