]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: snmp: remove SNMP_MIB_SENTINEL
authorEric Dumazet <edumazet@google.com>
Fri, 5 Sep 2025 16:58:13 +0000 (16:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Sep 2025 01:06:21 +0000 (18:06 -0700)
No more user of SNMP_MIB_SENTINEL, we can remove it.

Also remove snmp_get_cpu_field[64]_batch() helpers.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20250905165813.1470708-10-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip.h
include/net/snmp.h

index a1624e8db1abdc87a8c4e30e41c231932688cb74..380afb691c419ae71aa56ea64287eb4a1ac5fd39 100644 (file)
@@ -326,18 +326,6 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o
 }
 #endif
 
-#define snmp_get_cpu_field64_batch(buff64, stats_list, mib_statistic, offset) \
-{ \
-       int i, c; \
-       for_each_possible_cpu(c) { \
-               for (i = 0; stats_list[i].name; i++) \
-                       buff64[i] += snmp_get_cpu_field64( \
-                                       mib_statistic, \
-                                       c, stats_list[i].entry, \
-                                       offset); \
-       } \
-}
-
 #define snmp_get_cpu_field64_batch_cnt(buff64, stats_list, cnt,        \
                                       mib_statistic, offset)   \
 { \
@@ -351,17 +339,6 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o
        } \
 }
 
-#define snmp_get_cpu_field_batch(buff, stats_list, mib_statistic) \
-{ \
-       int i, c; \
-       for_each_possible_cpu(c) { \
-               for (i = 0; stats_list[i].name; i++) \
-                       buff[i] += snmp_get_cpu_field( \
-                                               mib_statistic, \
-                                               c, stats_list[i].entry); \
-       } \
-}
-
 #define snmp_get_cpu_field_batch_cnt(buff, stats_list, cnt, mib_statistic) \
 { \
        int i, c; \
index 4cb4326dfebe6bbfa14cfac1d987bc6f6c21954a..584e70742e9b7de51480f33c833a7e3aef4a5c65 100644 (file)
@@ -36,11 +36,6 @@ struct snmp_mib {
        .entry = _entry,                        \
 }
 
-#define SNMP_MIB_SENTINEL {    \
-       .name = NULL,           \
-       .entry = 0,             \
-}
-
 /*
  * We use unsigned longs for most mibs but u64 for ipstats.
  */