Thread (44 messages) 44 messages, 7 authors, 2020-08-06

Re: [PATCH v3 6/9] ethernet: ti: cpts: Use generic helper function

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2020-08-02 20:22:40


On 7/30/2020 1:00 AM, Kurt Kanzenbach wrote:
In order to reduce code duplication between ptp drivers, generic helper
functions were introduced. Use them.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
[snip]
-	if (unlikely(ptp_class & PTP_CLASS_V1))
-		msgtype = data + offset + OFF_PTP_CONTROL;
-	else
-		msgtype = data + offset;
+	msgtype = ptp_get_msgtype(hdr, ptp_class);
+	seqid	= be16_to_cpu(hdr->sequence_id);
Same comment as patch 5 would probably apply here as well, with using
ntohs():

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help