]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tipc: remove set but not used variable 'prev'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 28 May 2020 07:43:59 +0000 (07:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 May 2020 23:59:04 +0000 (16:59 -0700)
Fixes gcc '-Wunused-but-set-variable' warning:

net/tipc/msg.c: In function 'tipc_msg_append':
net/tipc/msg.c:215:24: warning:
 variable 'prev' set but not used [-Wunused-but-set-variable]

commit 5c58ff01e7cf ("tipc: add test for Nagle algorithm effectiveness")
left behind this, remove it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/msg.c

index 23809039dda1378bf554c89546898dba45dea3df..c0afcd627c5e521a875a687c64f9253c226c3b2b 100644 (file)
@@ -212,7 +212,7 @@ err:
 int tipc_msg_append(struct tipc_msg *_hdr, struct msghdr *m, int dlen,
                    int mss, struct sk_buff_head *txq)
 {
-       struct sk_buff *skb, *prev;
+       struct sk_buff *skb;
        int accounted, total, curr;
        int mlen, cpy, rem = dlen;
        struct tipc_msg *hdr;
@@ -223,7 +223,6 @@ int tipc_msg_append(struct tipc_msg *_hdr, struct msghdr *m, int dlen,
 
        while (rem) {
                if (!skb || skb->len >= mss) {
-                       prev = skb;
                        skb = tipc_buf_acquire(mss, GFP_KERNEL);
                        if (unlikely(!skb))
                                return -ENOMEM;