lkml.org 
[lkml]   [2022]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [Intel-wired-lan] [PATCH] igb: zero hwtstamp by default
Date


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> trix@redhat.com
> Sent: Sunday, March 13, 2022 8:32 PM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; davem@davemloft.net; kuba@kernel.org;
> nathan@kernel.org; ndesaulniers@google.com
> Cc: netdev@vger.kernel.org; llvm@lists.linux.dev; intel-wired-
> lan@lists.osuosl.org; linux-kernel@vger.kernel.org; Tom Rix
> <trix@redhat.com>
> Subject: [Intel-wired-lan] [PATCH] igb: zero hwtstamp by default
>
> From: Tom Rix <trix@redhat.com>
>
> 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 <trix@redhat.com>
> ---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>

Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)

\
 
 \ /
  Last update: 2022-03-16 07:15    [W:0.036 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site