Thread (16 messages) 16 messages, 3 authors, 2020-08-19

Re: [PATCH v4 3/9] net: dsa: mv88e6xxx: Use generic helper function

From: Kurt Kanzenbach <kurt@linutronix.de>
Date: 2020-08-19 06:00:59

On Tue Aug 18 2020, Russell King - ARM Linux admin wrote:
On Tue, Aug 18, 2020 at 12:32:45PM +0200, Kurt Kanzenbach wrote:
quoted
-static int is_pdelay_resp(u8 *msgtype)
+static int is_pdelay_resp(const struct ptp_header *hdr)
 {
-	return (*msgtype & 0xf) == 3;
+	return (hdr->tsmt & 0xf) == 3;
Forgive my ignorance about PTPv1, but does PTPv1 have these as well?
pdelay is PTP v2 specific. 
Is there a reason not to use the helper introduced in patch 2 here?
Yes, it doesn't have to be. This driver only deals with PTP v2.
Should we have definitions for the message types?
That is something one can think of. At the moment there are not many
users though.

Thanks,
Kurt

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help