linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH wpan-next 1/2] 6lowpan: nhc: more constify api
@ 2022-06-13  3:29 Alexander Aring
  2022-06-13  3:29 ` [PATCH wpan-next 2/2] 6lowpan: nhc: drop EEXIST limitation Alexander Aring
  2022-06-13  4:20 ` [wpan-next,1/2] 6lowpan: nhc: more constify api bluez.test.bot
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Aring @ 2022-06-13  3:29 UTC (permalink / raw)
  To: stefan; +Cc: linux-wpan, linux-bluetooth, netdev, aahringo

This patch adds an const to the return of lowpan_nhc_by_nexthdr(), as we
never modify nhcs.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 net/6lowpan/nhc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/6lowpan/nhc.h b/net/6lowpan/nhc.h
index ab7b4977c32b..4ba6b2ffcb47 100644
--- a/net/6lowpan/nhc.h
+++ b/net/6lowpan/nhc.h
@@ -66,6 +66,7 @@ struct lowpan_nhc {
 
 	int		(*uncompress)(struct sk_buff *skb, size_t needed);
 	int		(*compress)(struct sk_buff *skb, u8 **hc_ptr);
+
 };
 
 /**
@@ -73,7 +74,7 @@ struct lowpan_nhc {
  *
  * @nexthdr: ipv6 nexthdr value.
  */
-struct lowpan_nhc *lowpan_nhc_by_nexthdr(u8 nexthdr);
+const struct lowpan_nhc *lowpan_nhc_by_nexthdr(u8 nexthdr);
 
 /**
  * lowpan_nhc_check_compression - checks if we support compression format. If
-- 
2.31.1


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

end of thread, other threads:[~2022-06-16 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13  3:29 [PATCH wpan-next 1/2] 6lowpan: nhc: more constify api Alexander Aring
2022-06-13  3:29 ` [PATCH wpan-next 2/2] 6lowpan: nhc: drop EEXIST limitation Alexander Aring
2022-06-16  7:57   ` Stefan Schmidt
2022-06-16 12:57     ` Alexander Aring
2022-06-13  4:20 ` [wpan-next,1/2] 6lowpan: nhc: more constify api bluez.test.bot

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).