From: David S. Miller Date: Thu, 19 May 2011 22:41:03 +0000 (-0400) Subject: rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer(). X-Git-Tag: v3.0~749^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a64255019e13dd975f1487cec32b873bcb76da6;p=platform%2Fkernel%2Flinux-amlogic.git rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer(). I backed off from trying to just eliminate this variable, since transforming atomic_inc_return() into atomic_inc() takes away the memory barriers. Signed-off-by: David S. Miller --- diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c index b6ff063..2754f09 100644 --- a/net/rxrpc/ar-peer.c +++ b/net/rxrpc/ar-peer.c @@ -157,6 +157,7 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp) /* we can now add the new candidate to the list */ peer = candidate; candidate = NULL; + usage = atomic_read(&peer->usage); list_add_tail(&peer->link, &rxrpc_peers); write_unlock_bh(&rxrpc_peer_lock); @@ -171,7 +172,7 @@ success: &peer->srx.transport.sin.sin_addr, ntohs(peer->srx.transport.sin.sin_port)); - _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage)); + _leave(" = %p {u=%d}", peer, usage); return peer; /* we found the peer in the list immediately */