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

2020-08-18 Thread Kurt Kanzenbach
On Tue Aug 18 2020, Russell King - ARM Linux admin wrote: > On Tue, Aug 18, 2020 at 12:32:45PM +0200, Kurt Kanzenbach wrote: >> -static int is_pdelay_resp(u8 *msgtype) >> +static int is_pdelay_resp(const struct ptp_header *hdr) >> { >> -return (*msgtype & 0xf) == 3; >> +return (hdr->tsmt &

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

2020-08-18 Thread Russell King - ARM Linux admin
On Tue, Aug 18, 2020 at 12:32:45PM +0200, Kurt Kanzenbach wrote: > -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 h

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

2020-08-18 Thread Kurt Kanzenbach
In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Tested-by: Richard Cochran Reviewed-by: Florian Fainelli --- drivers/net/dsa/mv88e6xxx/hwtstamp.c | 59 ++-- 1 file changed, 13 in