Skip to contentSkip to conversation

ptp: add stub function for ptp_get_msgtype()

PATCH Applied Yangbo Lu 4 participants 4 messages Sep 27, 2020 – Sep 28, 2020

Subsystems (4)
lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/1 ptp: add stub function for ptp_get_msgtype()

Added the missing stub function for ptp_get_msgtype().

Fixes 036c508ba95e ("ptp: Add generic ptp message type function")
---
 include/linux/ptp_classify.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/linux/ptp_classify.h +8 -0
index 8437307..c6487b7 100644
@@ -134,5 +134,13 @@ static inline struct ptp_header *ptp_parse_header(struct sk_buff *skb,
 {
 	return NULL;
 }
+static inline u8 ptp_get_msgtype(const struct ptp_header *hdr,
+				 unsigned int type)
+{
+	/* The return is meaningless. The stub function would not be
+	 * executed since no available header from ptp_parse_header.
+	 */
+	return 0;
+}
 #endif
 #endif /* _PTP_CLASSIFY_H_ */
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Yangbo Lu

Added the missing stub function for ptp_get_msgtype().

Fixes 036c508ba95e ("ptp: Add generic ptp message type function")

Yes, that works. Thanks.

Quoted 23 lines
---
 include/linux/ptp_classify.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/linux/ptp_classify.h +8 -0
index 8437307..c6487b7 100644
@@ -134,5 +134,13 @@ static inline struct ptp_header *ptp_parse_header(struct sk_buff *skb,
 {
 	return NULL;
 }
+static inline u8 ptp_get_msgtype(const struct ptp_header *hdr,
+				 unsigned int type)
+{
+	/* The return is meaningless. The stub function would not be
+	 * executed since no available header from ptp_parse_header.
+	 */
+	return 0;
+}
 #endif
 #endif /* _PTP_CLASSIFY_H_ */
Signature · 1 line
~Randy