lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080712222446.552f4069.akpm@linux-foundation.org>
Date:	Sat, 12 Jul 2008 22:24:46 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Howells <dhowells@...hat.com>
Cc:	flamingice@...rmilk.net, linville@...driver.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ