public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yangbo Lu <yangbo.lu@nxp.com>
To: netdev@vger.kernel.org
Cc: Yangbo Lu <yangbo.lu@nxp.com>,
	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Richard Cochran <richardcochran@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: [PATCH] ptp: add stub function for ptp_get_msgtype()
Date: Sun, 27 Sep 2020 16:01:50 +0800	[thread overview]
Message-ID: <20200927080150.8479-1-yangbo.lu@nxp.com> (raw)

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


             reply	other threads:[~2020-09-27  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27  8:01 Yangbo Lu [this message]
2020-09-27 16:14 ` [PATCH] ptp: add stub function for ptp_get_msgtype() Randy Dunlap
2020-09-27 20:30 ` David Miller
2020-09-28  5:46 ` Kurt Kanzenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200927080150.8479-1-yangbo.lu@nxp.com \
    --to=yangbo.lu@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox