staging: ks7010: remove redundant variable eth_proto
authorColin Ian King <colin.king@canonical.com>
Wed, 11 Jul 2018 10:59:11 +0000 (11:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 11:12:34 +0000 (13:12 +0200)
Variable eth_proto is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'eth_proto' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index 0ecffab..a85975f 100644 (file)
@@ -354,7 +354,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)
        u16 auth_type;
        unsigned char temp[256];
        struct ether_hdr *eth_hdr;
-       unsigned short eth_proto;
        struct ieee802_1x_hdr *aa1x_hdr;
        size_t size;
        int ret;
@@ -369,7 +368,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)
        get_word(priv); /* Reserve Area */
 
        eth_hdr = (struct ether_hdr *)(priv->rxp);
-       eth_proto = ntohs(eth_hdr->h_proto);
 
        /* source address check */
        if (ether_addr_equal(&priv->eth_addr[0], eth_hdr->h_source)) {