From: Eric Dumazet Date: Fri, 5 Sep 2025 16:58:13 +0000 (+0000) Subject: net: snmp: remove SNMP_MIB_SENTINEL X-Git-Tag: v6.18-rc1~132^2~239^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20d3d26815441d03a9a15114729faaa54957baba;p=thirdparty%2Flinux.git net: snmp: remove SNMP_MIB_SENTINEL 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 Reviewed-by: Sabrina Dubroca Link: https://patch.msgid.link/20250905165813.1470708-10-edumazet@google.com Signed-off-by: Jakub Kicinski --- diff --git a/include/net/ip.h b/include/net/ip.h index a1624e8db1abd..380afb691c419 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -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; \ diff --git a/include/net/snmp.h b/include/net/snmp.h index 4cb4326dfebe6..584e70742e9b7 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h @@ -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. */