From: Alexander Aring <aahringo@redhat.com>
To: stefan@datenfreihafen.org
Cc: linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org,
netdev@vger.kernel.org, aahringo@redhat.com
Subject: [PATCH wpan-next 1/2] 6lowpan: nhc: more constify api
Date: Sun, 12 Jun 2022 23:29:21 -0400 [thread overview]
Message-ID: <20220613032922.1030739-1-aahringo@redhat.com> (raw)
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
next reply other threads:[~2022-06-13 3:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 3:29 Alexander Aring [this message]
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
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=20220613032922.1030739-1-aahringo@redhat.com \
--to=aahringo@redhat.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
/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;
as well as URLs for NNTP newsgroup(s).