diff mbox series

[net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const

Message ID 20230924153014.786962-1-b.galvani@gmail.com (mailing list archive)
State Accepted
Commit f25e621f5d4c423fa7217afbddd427007b0e0ec0
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1384 this patch: 1384
netdev/cc_maintainers warning 1 maintainers not CCed: edumazet@google.com
netdev/build_clang success Errors and warnings before: 1364 this patch: 1364
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1440 this patch: 1440
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 22 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Beniamino Galvani Sept. 24, 2023, 3:30 p.m. UTC
The function doesn't modify the addresses passed as input, mark them
as 'const' to make that clear.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
---
 include/net/udp_tunnel.h  | 5 +++--
 net/ipv6/ip6_udp_tunnel.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

Comments

Guillaume Nault Sept. 25, 2023, 11:06 a.m. UTC | #1
On Sun, Sep 24, 2023 at 05:30:14PM +0200, Beniamino Galvani wrote:
> The function doesn't modify the addresses passed as input, mark them
> as 'const' to make that clear.

Reviewed-by: Guillaume Nault <gnault@redhat.com>
patchwork-bot+netdevbpf@kernel.org Oct. 3, 2023, 10:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sun, 24 Sep 2023 17:30:14 +0200 you wrote:
> The function doesn't modify the addresses passed as input, mark them
> as 'const' to make that clear.
> 
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
>  include/net/udp_tunnel.h  | 5 +++--
>  net/ipv6/ip6_udp_tunnel.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
    https://git.kernel.org/netdev/net-next/c/f25e621f5d4c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index 29251c3519cf..21ba0a25f936 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -154,8 +154,9 @@  void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb
 
 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
 			 struct sk_buff *skb,
-			 struct net_device *dev, struct in6_addr *saddr,
-			 struct in6_addr *daddr,
+			 struct net_device *dev,
+			 const struct in6_addr *saddr,
+			 const struct in6_addr *daddr,
 			 __u8 prio, __u8 ttl, __be32 label,
 			 __be16 src_port, __be16 dst_port, bool nocheck);
 
diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c
index cdc4d4ee2420..70d38705c92f 100644
--- a/net/ipv6/ip6_udp_tunnel.c
+++ b/net/ipv6/ip6_udp_tunnel.c
@@ -75,8 +75,9 @@  EXPORT_SYMBOL_GPL(udp_sock_create6);
 
 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
 			 struct sk_buff *skb,
-			 struct net_device *dev, struct in6_addr *saddr,
-			 struct in6_addr *daddr,
+			 struct net_device *dev,
+			 const struct in6_addr *saddr,
+			 const struct in6_addr *daddr,
 			 __u8 prio, __u8 ttl, __be32 label,
 			 __be16 src_port, __be16 dst_port, bool nocheck)
 {