diff options
author | Tom Rix <[email protected]> | 2022-03-13 08:02:10 -0700 |
---|---|---|
committer | Tony Nguyen <[email protected]> | 2022-03-17 08:32:28 -0700 |
commit | 5d705de0cd3400b2721185430e0dddeff79d7871 (patch) | |
tree | a6967892ff947663c35c2b328f6237042d1826df /net/lapb/lapb_subr.c | |
parent | ad739d0889a81a4273ab60a6c83cac3e6fad6aad (diff) |
igb: zero hwtstamp by default
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: Tom Rix <[email protected]>
Tested-by: Gurucharan G <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions