lkml.org 
[lkml]   [2023]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Intel-wired-lan] [PATCH] igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp()
From
On 1/14/2023 16:04, Tom Rix wrote:
> clang static analysis reports
> drivers/net/ethernet/intel/igc/igc_ptp.c:673:3: warning: The left operand of
> '+' is a garbage value [core.UndefinedBinaryOperatorResult]
> ktime_add_ns(shhwtstamps.hwtstamp, adjust);
> ^ ~~~~~~~~~~~~~~~~~~~~
>
> igc_ptp_systim_to_hwtstamp() silently returns without setting the hwtstamp
> if the mac type is unknown. This should be treated as an error.
>
> Fixes: 81b055205e8b ("igc: Add support for RX timestamping")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/net/ethernet/intel/igc/igc_ptp.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>

\
 
 \ /
  Last update: 2023-03-26 23:52    [W:0.071 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site