]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rxrpc: remove redundant variables 'sp' and 'did_discard'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 1 Aug 2018 09:52:34 +0000 (17:52 +0800)
committerDavid Howells <dhowells@redhat.com>
Wed, 1 Aug 2018 12:28:23 +0000 (13:28 +0100)
Variables 'sp' and 'did_discard' are being assigned,
but are never used, hence they are redundant and can be removed.

fix following warning:

net/rxrpc/call_event.c:165:25: warning: variable 'sp' set but not used [-Wunused-but-set-variable]
net/rxrpc/conn_client.c:1054:7: warning: variable 'did_discard' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_event.c
net/rxrpc/conn_client.c

index 20210418904bf61975e5f00ef196c5dce4770cca..8e7434e92097e8f0a2676bcf87df090daf43ee2e 100644 (file)
@@ -162,7 +162,6 @@ static void rxrpc_congestion_timeout(struct rxrpc_call *call)
  */
 static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
 {
-       struct rxrpc_skb_priv *sp;
        struct sk_buff *skb;
        unsigned long resend_at;
        rxrpc_seq_t cursor, seq, top;
@@ -207,7 +206,6 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
 
                skb = call->rxtx_buffer[ix];
                rxrpc_see_skb(skb, rxrpc_skb_tx_seen);
-               sp = rxrpc_skb(skb);
 
                if (anno_type == RXRPC_TX_ANNO_UNACK) {
                        if (ktime_after(skb->tstamp, max_age)) {
index 5736f643c51646b603cbad57330930bba6712ff1..e4bfbd7e48a81bbf666e5eb55cd651d73274f662 100644 (file)
@@ -1051,7 +1051,6 @@ void rxrpc_discard_expired_client_conns(struct work_struct *work)
                container_of(work, struct rxrpc_net, client_conn_reaper);
        unsigned long expiry, conn_expires_at, now;
        unsigned int nr_conns;
-       bool did_discard = false;
 
        _enter("");
 
@@ -1113,7 +1112,6 @@ next:
         * If someone re-sets the flag and re-gets the ref, that's fine.
         */
        rxrpc_put_connection(conn);
-       did_discard = true;
        nr_conns--;
        goto next;