mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
snmp: add align parameter to snmp_mib_init()
In preparation for 64bit snmp counters for some mibs, add an 'align' parameter to snmp_mib_init(), instead of assuming mibs only contain 'unsigned long' fields. Callers can use __alignof__(type) to provide correct alignment. Signed-off-by: Eric Dumazet <[email protected]> CC: Herbert Xu <[email protected]> CC: Arnaldo Carvalho de Melo <[email protected]> CC: Hideaki YOSHIFUJI <[email protected]> CC: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
5eaa0bd81f
commit
1823e4c80e
7 changed files with 40 additions and 22 deletions
|
|
@ -1002,7 +1002,8 @@ EXPORT_SYMBOL_GPL(dccp_shutdown);
|
|||
static inline int dccp_mib_init(void)
|
||||
{
|
||||
return snmp_mib_init((void __percpu **)dccp_statistics,
|
||||
sizeof(struct dccp_mib));
|
||||
sizeof(struct dccp_mib),
|
||||
__alignof__(struct dccp_mib));
|
||||
}
|
||||
|
||||
static inline void dccp_mib_exit(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue