fm10k: remove needless initialization of size local variable
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 8 Jul 2019 23:12:31 +0000 (16:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 4 Aug 2019 11:31:03 +0000 (04:31 -0700)
The local variable 'size' in fm10k_dfwd_add_station is initialized, but
is always re-assigned immediately before use. Remove this unnecessary
initialization.

This was detected by cppcheck and resolves the following warning
produced by that tool:

[fm10k_netdev.c:1466]: (style) Variable 'size' is assigned a value that is never used.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c

index 4704395c0f6615cb82c56bb1c2f39a2b44585da0..d3e85480f46d616b4c289571f504450913f7ff17 100644 (file)
@@ -1463,7 +1463,7 @@ static void *fm10k_dfwd_add_station(struct net_device *dev,
        struct fm10k_l2_accel *old_l2_accel = NULL;
        struct fm10k_dglort_cfg dglort = { 0 };
        struct fm10k_hw *hw = &interface->hw;
-       int size = 0, i;
+       int size, i;
        u16 vid, glort;
 
        /* The hardware supported by fm10k only filters on the destination MAC