linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ptp: add stub function for ptp_get_msgtype()
@ 2020-09-27  8:01 Yangbo Lu
  2020-09-27 16:14 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yangbo Lu @ 2020-09-27  8:01 UTC (permalink / raw)
  To: netdev
  Cc: Yangbo Lu, linux-kernel, linux-next, David S . Miller,
	Richard Cochran, Kurt Kanzenbach, Florian Fainelli, Randy Dunlap

Added the missing stub function for ptp_get_msgtype().

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: add stub function for ptp_get_msgtype()
  2020-09-27  8:01 [PATCH] ptp: add stub function for ptp_get_msgtype() Yangbo Lu
@ 2020-09-27 16:14 ` Randy Dunlap
  2020-09-27 20:30 ` David Miller
  2020-09-28  5:46 ` Kurt Kanzenbach
  2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2020-09-27 16:14 UTC (permalink / raw)
  To: Yangbo Lu, netdev
  Cc: linux-kernel, linux-next, David S . Miller, Richard Cochran,
	Kurt Kanzenbach, Florian Fainelli

On 9/27/20 1:01 AM, Yangbo Lu wrote:
> Added the missing stub function for ptp_get_msgtype().
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Yes, that works. Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org> # 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: add stub function for ptp_get_msgtype()
  2020-09-27  8:01 [PATCH] ptp: add stub function for ptp_get_msgtype() Yangbo Lu
  2020-09-27 16:14 ` Randy Dunlap
@ 2020-09-27 20:30 ` David Miller
  2020-09-28  5:46 ` Kurt Kanzenbach
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-09-27 20:30 UTC (permalink / raw)
  To: yangbo.lu
  Cc: netdev, linux-kernel, linux-next, richardcochran, kurt,
	f.fainelli, rdunlap

From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Sun, 27 Sep 2020 16:01:50 +0800

> Added the missing stub function for ptp_get_msgtype().
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptp: add stub function for ptp_get_msgtype()
  2020-09-27  8:01 [PATCH] ptp: add stub function for ptp_get_msgtype() Yangbo Lu
  2020-09-27 16:14 ` Randy Dunlap
  2020-09-27 20:30 ` David Miller
@ 2020-09-28  5:46 ` Kurt Kanzenbach
  2 siblings, 0 replies; 4+ messages in thread
From: Kurt Kanzenbach @ 2020-09-28  5:46 UTC (permalink / raw)
  To: Yangbo Lu, netdev
  Cc: Yangbo Lu, linux-kernel, linux-next, David S . Miller,
	Richard Cochran, Florian Fainelli, Randy Dunlap

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

On Sun Sep 27 2020, Yangbo Lu wrote:
> Added the missing stub function for ptp_get_msgtype().
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: 036c508ba95e ("ptp: Add generic ptp message type function")
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Oh, my bad. Thanks for fixing it.

Thanks,
Kurt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-28  5:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27  8:01 [PATCH] ptp: add stub function for ptp_get_msgtype() Yangbo Lu
2020-09-27 16:14 ` Randy Dunlap
2020-09-27 20:30 ` David Miller
2020-09-28  5:46 ` Kurt Kanzenbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).