mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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 @@ int sctp_register_pf(struct sctp_pf *pf, sa_family_t family)
|
|||
static inline int init_sctp_mibs(void)
|
||||
{
|
||||
return snmp_mib_init((void __percpu **)sctp_statistics,
|
||||
sizeof(struct sctp_mib));
|
||||
sizeof(struct sctp_mib),
|
||||
__alignof__(struct sctp_mib));
|
||||
}
|
||||
|
||||
static inline void cleanup_sctp_mibs(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue