2020-09-27 08:20:23

by Yangbo Lu

[permalink] [raw]
Subject: [PATCH] ptp: add stub function for ptp_get_msgtype()

Added the missing stub function for ptp_get_msgtype().

Reported-by: Randy Dunlap <[email protected]>
Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
Signed-off-by: Yangbo Lu <[email protected]>
---
include/linux/ptp_classify.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
index 8437307..c6487b7 100644
--- a/include/linux/ptp_classify.h
+++ b/include/linux/ptp_classify.h
@@ -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_ */
--
2.7.4


2020-09-27 16:16:39

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

On 9/27/20 1:01 AM, Yangbo Lu wrote:
> Added the missing stub function for ptp_get_msgtype().
>
> Reported-by: Randy Dunlap <[email protected]>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <[email protected]>

Yes, that works. Thanks.

Acked-by: Randy Dunlap <[email protected]> # build-tested


> ---
> include/linux/ptp_classify.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
> index 8437307..c6487b7 100644
> --- a/include/linux/ptp_classify.h
> +++ b/include/linux/ptp_classify.h
> @@ -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_ */
>


--
~Randy

2020-09-27 20:32:05

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

From: Yangbo Lu <[email protected]>
Date: Sun, 27 Sep 2020 16:01:50 +0800

> Added the missing stub function for ptp_get_msgtype().
>
> Reported-by: Randy Dunlap <[email protected]>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <[email protected]>

Applied to net-next, thanks.

2020-09-28 05:48:40

by Kurt Kanzenbach

[permalink] [raw]
Subject: Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

On Sun Sep 27 2020, Yangbo Lu wrote:
> Added the missing stub function for ptp_get_msgtype().
>
> Reported-by: Randy Dunlap <[email protected]>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <[email protected]>

Oh, my bad. Thanks for fixing it.

Thanks,
Kurt


Attachments:
signature.asc (847.00 B)