net: pasemi: remove set but not used variable 'cpyhdr'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 3 Apr 2019 07:50:27 +0000 (15:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:36:23 +0000 (17:36 -0700)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_queue_csdesc':
drivers/net/ethernet/pasemi/pasemi_mac.c:1358:29: warning: variable 'cpyhdr' set but not used [-Wunused-but-set-variable]

It's never used since commit 8d636d8bc5ff ("pasemi_mac: jumbo
frame support") and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pasemi/pasemi_mac.c

index 55d686ed8cdfddbfc4077947a9e561539f060281..5ffaee9f53b18d46d339f7b26ef5f1916333644a 100644 (file)
@@ -1355,7 +1355,7 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,
        const int nh_off = skb_network_offset(skb);
        const int nh_len = skb_network_header_len(skb);
        const int nfrags = skb_shinfo(skb)->nr_frags;
-       int cs_size, i, fill, hdr, cpyhdr, evt;
+       int cs_size, i, fill, hdr, evt;
        dma_addr_t csdma;
 
        fund = XCT_FUN_ST | XCT_FUN_RR_8BRES |
@@ -1396,7 +1396,6 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,
                fill++;
 
        /* Copy the result into the TCP packet */
-       cpyhdr = fill;
        CS_DESC(csring, fill++) = XCT_FUN_O | XCT_FUN_FUN(csring->fun) |
                                  XCT_FUN_LLEN(2) | XCT_FUN_SE;
        CS_DESC(csring, fill++) = XCT_PTR_LEN(2) | XCT_PTR_ADDR(cs_dest) | XCT_PTR_T;