diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-22 20:58:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-25 21:33:17 -0700 |
commit | 1823e4c80eeae2a774c75569ce3035070e5ee009 (patch) | |
tree | bdc1bdf4a67027193312ad584924ca8a986a064c /net/dccp | |
parent | 5eaa0bd81f93225b6d1972b373ed00ca763052b2 (diff) | |
download | linux-stable-1823e4c80eeae2a774c75569ce3035070e5ee009.tar.gz linux-stable-1823e4c80eeae2a774c75569ce3035070e5ee009.tar.bz2 linux-stable-1823e4c80eeae2a774c75569ce3035070e5ee009.zip |
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 <eric.dumazet@gmail.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
CC: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/proto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index f79bcef5088f..096250d1323b 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -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) |