diff mbox series

[v2,net-next,2/4] inetpeer: use EXPORT_IPV6_MOD[_GPL]()

Message ID 20250212132418.1524422-3-edumazet@google.com (mailing list archive)
State Accepted
Commit 95a3c96c746008a2abed2882e0da48a78f941c49
Delegated to: Netdev Maintainers
Headers show
Series net: add EXPORT_IPV6_MOD() | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for 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: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: dsahern@kernel.org
netdev/build_clang success Errors and warnings before: 2 this patch: 2
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: 0 this patch: 0
netdev/checkpatch warning CHECK: Please use a blank line after function/struct/union/enum declarations
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-02-13--12-00 (tests: 889)

Commit Message

Eric Dumazet Feb. 12, 2025, 1:24 p.m. UTC
Use EXPORT_IPV6_MOD[_GPL]() for symbols that do not need to
to be exported unless CONFIG_IPV6=m

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/inetpeer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Kuniyuki Iwashima Feb. 13, 2025, 3:53 a.m. UTC | #1
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 12 Feb 2025 13:24:16 +0000
> Use EXPORT_IPV6_MOD[_GPL]() for symbols that do not need to
> to be exported unless CONFIG_IPV6=m
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Mateusz Polchlopek Feb. 13, 2025, 7:26 a.m. UTC | #2
On 2/12/2025 2:24 PM, Eric Dumazet wrote:
> Use EXPORT_IPV6_MOD[_GPL]() for symbols that do not need to
> to be exported unless CONFIG_IPV6=m
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>   net/ipv4/inetpeer.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
> index b8b23a77ceb4f0f1a3d3adaacea2a7c59a7da3c9..7b1e0a2d6906673316ec4bef777e359ac175dbf8 100644
> --- a/net/ipv4/inetpeer.c
> +++ b/net/ipv4/inetpeer.c
> @@ -60,7 +60,7 @@ void inet_peer_base_init(struct inet_peer_base *bp)
>   	seqlock_init(&bp->lock);
>   	bp->total = 0;
>   }
> -EXPORT_SYMBOL_GPL(inet_peer_base_init);
> +EXPORT_IPV6_MOD_GPL(inet_peer_base_init);
>   
>   #define PEER_MAX_GC 32
>   
> @@ -218,7 +218,7 @@ struct inet_peer *inet_getpeer(struct inet_peer_base *base,
>   
>   	return p;
>   }
> -EXPORT_SYMBOL_GPL(inet_getpeer);
> +EXPORT_IPV6_MOD_GPL(inet_getpeer);
>   
>   void inet_putpeer(struct inet_peer *p)
>   {
> @@ -269,7 +269,7 @@ bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout)
>   		WRITE_ONCE(peer->rate_tokens, token);
>   	return rc;
>   }
> -EXPORT_SYMBOL(inet_peer_xrlim_allow);
> +EXPORT_IPV6_MOD(inet_peer_xrlim_allow);
>   
>   void inetpeer_invalidate_tree(struct inet_peer_base *base)
>   {
> @@ -286,4 +286,4 @@ void inetpeer_invalidate_tree(struct inet_peer_base *base)
>   
>   	base->total = 0;
>   }
> -EXPORT_SYMBOL(inetpeer_invalidate_tree);
> +EXPORT_IPV6_MOD(inetpeer_invalidate_tree);

Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
diff mbox series

Patch

diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index b8b23a77ceb4f0f1a3d3adaacea2a7c59a7da3c9..7b1e0a2d6906673316ec4bef777e359ac175dbf8 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -60,7 +60,7 @@  void inet_peer_base_init(struct inet_peer_base *bp)
 	seqlock_init(&bp->lock);
 	bp->total = 0;
 }
-EXPORT_SYMBOL_GPL(inet_peer_base_init);
+EXPORT_IPV6_MOD_GPL(inet_peer_base_init);
 
 #define PEER_MAX_GC 32
 
@@ -218,7 +218,7 @@  struct inet_peer *inet_getpeer(struct inet_peer_base *base,
 
 	return p;
 }
-EXPORT_SYMBOL_GPL(inet_getpeer);
+EXPORT_IPV6_MOD_GPL(inet_getpeer);
 
 void inet_putpeer(struct inet_peer *p)
 {
@@ -269,7 +269,7 @@  bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout)
 		WRITE_ONCE(peer->rate_tokens, token);
 	return rc;
 }
-EXPORT_SYMBOL(inet_peer_xrlim_allow);
+EXPORT_IPV6_MOD(inet_peer_xrlim_allow);
 
 void inetpeer_invalidate_tree(struct inet_peer_base *base)
 {
@@ -286,4 +286,4 @@  void inetpeer_invalidate_tree(struct inet_peer_base *base)
 
 	base->total = 0;
 }
-EXPORT_SYMBOL(inetpeer_invalidate_tree);
+EXPORT_IPV6_MOD(inetpeer_invalidate_tree);