net: dsa: bcm_sf2: Remove set but not used variables 'v6_spec, v6_m_spec'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 15 Feb 2019 02:36:47 +0000 (02:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 23:31:47 +0000 (15:31 -0800)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/dsa/bcm_sf2_cfp.c: In function 'bcm_sf2_cfp_ipv6_rule_set':
drivers/net/dsa/bcm_sf2_cfp.c:606:40: warning:
 variable 'v6_m_spec' set but not used [-Wunused-but-set-variable]
drivers/net/dsa/bcm_sf2_cfp.c:606:30: warning:
 variable 'v6_spec' set but not used [-Wunused-but-set-variable]

It not used any more after commit e4f7ef54cbd8 ("dsa: bcm_sf2: use flow_rule
infrastructure")

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

index 0b9ca4bdf47ea844b9a7e12e6b22686712e0ac6b..e6234d20978780ea0ae2b3847cf059619b83004d 100644 (file)
@@ -603,7 +603,6 @@ static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
                                     unsigned int queue_num,
                                     struct ethtool_rx_flow_spec *fs)
 {
-       struct ethtool_tcpip6_spec *v6_spec, *v6_m_spec;
        struct ethtool_rx_flow_spec_input input = {};
        unsigned int slice_num, rule_index[2];
        const struct cfp_udf_layout *layout;
@@ -618,13 +617,9 @@ static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
        switch (fs->flow_type & ~FLOW_EXT) {
        case TCP_V6_FLOW:
                ip_proto = IPPROTO_TCP;
-               v6_spec = &fs->h_u.tcp_ip6_spec;
-               v6_m_spec = &fs->m_u.tcp_ip6_spec;
                break;
        case UDP_V6_FLOW:
                ip_proto = IPPROTO_UDP;
-               v6_spec = &fs->h_u.udp_ip6_spec;
-               v6_m_spec = &fs->m_u.udp_ip6_spec;
                break;
        default:
                return -EINVAL;