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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  2 Feb 2012 12:19:23 +0100
From:	Sjur Brændeland <>
	Sjur Brændeland <>
Subject: [PATCH net-next 1/3] caif: Fix compile warning

Fix compile warning:
... warning: statement with no effect [-Wunused-value]
This warning is seen when debug-fs is disabled. Fix this
by adding new macro for use when no return value is needed.

Signed-off-by: Sjur Brændeland <>
 net/caif/caif_socket.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index a986280..543f23c 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -60,11 +60,13 @@ struct debug_fs_counter {
 	atomic_t num_rx_flow_on;
 static struct debug_fs_counter cnt;
-#define	dbfs_atomic_inc(v) atomic_inc_return(v)
-#define	dbfs_atomic_dec(v) atomic_dec_return(v)
+#define	dbfs_atomic_inc(v) atomic_inc(v)
+#define	dbfs_atomic_dec(v) atomic_dec(v)
+#define	dbfs_atomic_inc_ret(v) atomic_inc_return(v)
-#define	dbfs_atomic_inc(v) 0
-#define	dbfs_atomic_dec(v) 0
+#define	dbfs_atomic_inc_ret(v) 0
+#define	dbfs_atomic_inc(v)
+#define	dbfs_atomic_dec(v)
 struct caifsock {
@@ -1122,7 +1124,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
 	cf_sk->conn_req.protocol = protocol;
 	/* Increase the number of sockets created. */
-	num = dbfs_atomic_inc(&cnt.caif_sock_create);
+	num = dbfs_atomic_inc_ret(&cnt.caif_sock_create);
 	if (!IS_ERR(debugfsdir)) {

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists