• Tom Rix's avatar
    igb: zero hwtstamp by default · 5d705de0
    Tom Rix authored
    Clang static analysis reports this representative issue
    igb_ptp.c:997:3: warning: The left operand of '+' is a
      garbage value
      ktime_add_ns(shhwtstamps.hwtstamp, adjust);
      ^            ~~~~~~~~~~~~~~~~~~~~
    
    shhwtstamps.hwtstamp is set by a call to
    igb_ptp_systim_to_hwtstamp().  In the switch-statement
    for the hw type, the hwtstamp is zeroed for matches
    but not the default case.  Move the memset out of
    switch-statement.  This degarbages the default case
    and reduces the size.
    
    Some whitespace cleanup of empty lines
    Signed-off-by: default avatarTom Rix <trix@redhat.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    5d705de0
igb_ptp.c 42.3 KB