mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
cxgb4: use unaligned conversion for fetching timestamp
[ Upstream commit 589b1c9c166dce120e27b32a83a78f55464a7ef9 ]
Use get_unaligned_be64() to fetch the timestamp needed for ns_to_ktime()
conversion.
Fixes following sparse warning:
sge.c:3282:43: warning: cast to restricted __be64
Fixes: a456950445 ("cxgb4: time stamping interface for PTP")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8a1b8e6420
commit
0dc4dd433b
1 changed files with 1 additions and 1 deletions
|
|
@ -2816,7 +2816,7 @@ static noinline int t4_systim_to_hwstamp(struct adapter *adapter,
|
|||
|
||||
hwtstamps = skb_hwtstamps(skb);
|
||||
memset(hwtstamps, 0, sizeof(*hwtstamps));
|
||||
hwtstamps->hwtstamp = ns_to_ktime(be64_to_cpu(*((u64 *)data)));
|
||||
hwtstamps->hwtstamp = ns_to_ktime(get_unaligned_be64(data));
|
||||
|
||||
return RX_PTP_PKT_SUC;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue