Re: [PATCH v3 1/9] ptp: Add generic ptp v2 header parsing function
From: Kurt Kanzenbach <kurt@linutronix.de>
Date: 2020-07-31 10:06:54
Attachments
- signature.asc [application/pgp-signature] 832 bytes
From: Kurt Kanzenbach <kurt@linutronix.de>
Date: 2020-07-31 10:06:54
On Thu Jul 30 2020, Petr Machata wrote:
Kurt Kanzenbach [off-list ref] writes:quoted
@@ -107,6 +107,37 @@ unsigned int ptp_classify_raw(const struct sk_buff *skb) } EXPORT_SYMBOL_GPL(ptp_classify_raw); +struct ptp_header *ptp_parse_header(struct sk_buff *skb, unsigned int type) +{ + u8 *data = skb_mac_header(skb); + u8 *ptr = data;One of the "data" and "ptr" variables is superfluous.
Yeah. Can be shortened to u8 *ptr = skb_mac_header(skb); However, I'll wait a bit before sending the next version. So, that the other maintainers have time to test their drivers. Thanks, Kurt