]> git.baikalelectronics.ru Git - kernel.git/commit
igb/igc: use ktime accessors for skb->tstamp
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 6 Nov 2019 17:18:23 +0000 (09:18 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 9 Nov 2019 00:10:51 +0000 (16:10 -0800)
commit52690797cf97e414e02d72221228b2cc3e9b1599
tree527678b33b8907e8e1e3559c0866898c455942a6
parent33f2fada174a98484f4c475edd3e2d5caff14043
igb/igc: use ktime accessors for skb->tstamp

When implementing launch time support in the igb and igc drivers, the
skb->tstamp value is assumed to be a s64, but it's declared as a ktime_t
value.

Although ktime_t is typedef'd to s64 it wasn't always, and the kernel
provides accessors for ktime_t values.

Use the ktime_to_timespec64 and ktime_set accessors instead of directly
assuming that the variable is always an s64.

This improves portability if the code is ever moved to another kernel
version, or if the definition of ktime_t ever changes again in the
future.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igc/igc_main.c