diff mbox series

[net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const

Message ID 20220624164552.3813986-1-james@openvpn.net (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [net-next] netfilter: nf_nat_initialized() doesn't modify struct nf_conn, so pointer should be declared const | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 43 this patch: 43
netdev/cc_maintainers fail 9 maintainers not CCed: netfilter-devel@vger.kernel.org pablo@netfilter.org fw@strlen.de pabeni@redhat.com davem@davemloft.net edumazet@google.com kadlec@netfilter.org kuba@kernel.org coreteam@netfilter.org
netdev/build_clang success Errors and warnings before: 6 this patch: 6
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 43 this patch: 43
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

James Yonan June 24, 2022, 4:45 p.m. UTC
This is helpful for code readability and makes it possible
to call nf_nat_initialized() with a const struct nf_conn *.

Signed-off-by: James Yonan <james@openvpn.net>
---
 include/net/netfilter/nf_nat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski June 25, 2022, 5:39 a.m. UTC | #1
On Fri, 24 Jun 2022 10:45:52 -0600 James Yonan wrote:
> This is helpful for code readability and makes it possible
> to call nf_nat_initialized() with a const struct nf_conn *.

If you want this change to have any chance of getting into mainline you
need to CC maintainers.
diff mbox series

Patch

diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index 987111ae5240..e9eb01e99d2f 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -104,7 +104,7 @@  unsigned int
 nf_nat_inet_fn(void *priv, struct sk_buff *skb,
 	       const struct nf_hook_state *state);
 
-static inline int nf_nat_initialized(struct nf_conn *ct,
+static inline int nf_nat_initialized(const struct nf_conn *ct,
 				     enum nf_nat_manip_type manip)
 {
 	if (manip == NF_NAT_MANIP_SRC)