OpenCloudOS-Kernel/drivers/net/ethernet/intel
Tom Rix a2df8463e1 igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp()
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: 81b055205e ("igc: Add support for RX timestamping")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20230131215437.1528994-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-02-01 21:19:57 -08:00
..
e1000 e1000: Remove unnecessary use of kmap_atomic() 2022-11-02 11:09:13 -07:00
e1000e Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-08 18:19:59 -08:00
fm10k Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
i40e treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
iavf iavf: schedule watchdog immediately when changing primary MAC 2023-01-20 09:00:58 -08:00
ice ice: Prevent set_channel from changing queues while RDMA active 2023-01-27 11:32:18 -08:00
igb igb: Initialize mailbox message for VF reset 2022-12-13 19:26:36 -08:00
igbvf net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
igc igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp() 2023-02-01 21:19:57 -08:00
ixgb net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ixgbe ixgbe: fix pci device refcount leak 2023-01-10 11:38:58 -08:00
ixgbevf xfrm: allow state packet offload mode 2022-12-05 10:32:44 +01:00
Kconfig ice: support crosstimestamping on E822 devices if supported 2021-12-21 09:11:40 -08:00
Makefile
e100.c e100: Fix possible use after free in e100_xmit_prepare 2022-11-23 08:38:22 -08:00