ice: Do not unnecessarily initialize local variable
authorBruce Allan <bruce.w.allan@intel.com>
Tue, 16 Apr 2019 17:21:18 +0000 (10:21 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 4 May 2019 21:21:01 +0000 (14:21 -0700)
The local variable speed does not need to be initialized and can cause some
static analysis tools to complain the initial assigned value is never used.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_common.c

index 0f1c2267c9d76bed5b85bbf7c94fdcce1eb68c30..da7878529929fea347b07164527f2e43860eaf78 100644 (file)
@@ -1880,10 +1880,10 @@ void
 ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high,
                    u16 link_speeds_bitmap)
 {
-       u16 speed = ICE_AQ_LINK_SPEED_UNKNOWN;
        u64 pt_high;
        u64 pt_low;
        int index;
+       u16 speed;
 
        /* We first check with low part of phy_type */
        for (index = 0; index <= ICE_PHY_TYPE_LOW_MAX_INDEX; index++) {