diff mbox series

bridge: Make br_is_nd_neigh_msg() accept pointer to "const struct sk_buff"

Message ID 20250103070900.70014-1-znscnchen@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series bridge: Make br_is_nd_neigh_msg() accept pointer to "const struct sk_buff" | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
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: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 4 maintainers not CCed: pabeni@redhat.com edumazet@google.com horms@kernel.org kuba@kernel.org
netdev/build_clang success Errors and warnings before: 46 this patch: 46
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: 6 this patch: 6
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2025-01-03--09-00 (tests: 881)

Commit Message

Ted Chen Jan. 3, 2025, 7:09 a.m. UTC
The skb_buff struct in br_is_nd_neigh_msg() is never modified. Mark it as const.

Signed-off-by: Ted Chen <znscnchen@gmail.com>
---
 net/bridge/br_arp_nd_proxy.c | 2 +-
 net/bridge/br_private.h      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Nikolay Aleksandrov Jan. 3, 2025, 9:59 a.m. UTC | #1
On 1/3/25 09:09, Ted Chen wrote:
> The skb_buff struct in br_is_nd_neigh_msg() is never modified. Mark it as const.
> 
> Signed-off-by: Ted Chen <znscnchen@gmail.com>
> ---
>  net/bridge/br_arp_nd_proxy.c | 2 +-
>  net/bridge/br_private.h      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bridge/br_arp_nd_proxy.c b/net/bridge/br_arp_nd_proxy.c
> index c7869a286df4..115a23054a58 100644
> --- a/net/bridge/br_arp_nd_proxy.c
> +++ b/net/bridge/br_arp_nd_proxy.c
> @@ -229,7 +229,7 @@ void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
>  #endif
>  
>  #if IS_ENABLED(CONFIG_IPV6)
> -struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *msg)
> +struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *msg)
>  {
>  	struct nd_msg *m;
>  
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index 9853cfbb9d14..3fe432babfdf 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -2290,6 +2290,6 @@ void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
>  			      u16 vid, struct net_bridge_port *p);
>  void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br,
>  		       u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
> -struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
> +struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *m);
>  bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);
>  #endif

Hi,
This should be targeted at net-next (subject should be PATCH net-next).
Also please try to keep commit message lines shorter, checkpatch flags
this one as over 75 characters. You should wait 24 hours before posting
v2 of the patch.

Other than that the patch is ok.

Cheers,
 Nik
Ted Chen Jan. 4, 2025, 8:46 a.m. UTC | #2
On Fri, Jan 03, 2025 at 11:59:45AM +0200, Nikolay Aleksandrov wrote:
> On 1/3/25 09:09, Ted Chen wrote:
> > The skb_buff struct in br_is_nd_neigh_msg() is never modified. Mark it as const.
> > 
> > Signed-off-by: Ted Chen <znscnchen@gmail.com>
> > ---
> >  net/bridge/br_arp_nd_proxy.c | 2 +-
> >  net/bridge/br_private.h      | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/net/bridge/br_arp_nd_proxy.c b/net/bridge/br_arp_nd_proxy.c
> > index c7869a286df4..115a23054a58 100644
> > --- a/net/bridge/br_arp_nd_proxy.c
> > +++ b/net/bridge/br_arp_nd_proxy.c
> > @@ -229,7 +229,7 @@ void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
> >  #endif
> >  
> >  #if IS_ENABLED(CONFIG_IPV6)
> > -struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *msg)
> > +struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *msg)
> >  {
> >  	struct nd_msg *m;
> >  
> > diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> > index 9853cfbb9d14..3fe432babfdf 100644
> > --- a/net/bridge/br_private.h
> > +++ b/net/bridge/br_private.h
> > @@ -2290,6 +2290,6 @@ void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
> >  			      u16 vid, struct net_bridge_port *p);
> >  void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br,
> >  		       u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
> > -struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
> > +struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *m);
> >  bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);
> >  #endif
> 
> Hi,
> This should be targeted at net-next (subject should be PATCH net-next).
> Also please try to keep commit message lines shorter, checkpatch flags
> this one as over 75 characters. You should wait 24 hours before posting
> v2 of the patch.
> 
> Other than that the patch is ok.
> 
Thank you for your kindly guidance!
v2 is at: https://lore.kernel.org/all/20250104083846.71612-1-znscnchen@gmail.com

Ted
diff mbox series

Patch

diff --git a/net/bridge/br_arp_nd_proxy.c b/net/bridge/br_arp_nd_proxy.c
index c7869a286df4..115a23054a58 100644
--- a/net/bridge/br_arp_nd_proxy.c
+++ b/net/bridge/br_arp_nd_proxy.c
@@ -229,7 +229,7 @@  void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
 #endif
 
 #if IS_ENABLED(CONFIG_IPV6)
-struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *msg)
+struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *msg)
 {
 	struct nd_msg *m;
 
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 9853cfbb9d14..3fe432babfdf 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -2290,6 +2290,6 @@  void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
 			      u16 vid, struct net_bridge_port *p);
 void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br,
 		       u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
-struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
+struct nd_msg *br_is_nd_neigh_msg(const struct sk_buff *skb, struct nd_msg *m);
 bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);
 #endif