summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-04-10 03:50:13 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-10 03:50:13 -0700
commit996b1dbadcbcafb899f022303e01d46ab87920eb (patch)
tree563e72e594a784903b96de59281df52af5ad2cfb /net/sctp
parent24e8b7e48471514c9311c733b3f399bd20d014fe (diff)
downloadop-kernel-dev-996b1dbadcbcafb899f022303e01d46ab87920eb.zip
op-kernel-dev-996b1dbadcbcafb899f022303e01d46ab87920eb.tar.gz
[SCTP]: Use snmp_mib_{init,free}().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/protocol.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 067c8a1..b34437f 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -972,24 +972,14 @@ int sctp_register_pf(struct sctp_pf *pf, sa_family_t family)
return 1;
}
-static int __init init_sctp_mibs(void)
+static inline int init_sctp_mibs(void)
{
- sctp_statistics[0] = alloc_percpu(struct sctp_mib);
- if (!sctp_statistics[0])
- return -ENOMEM;
- sctp_statistics[1] = alloc_percpu(struct sctp_mib);
- if (!sctp_statistics[1]) {
- free_percpu(sctp_statistics[0]);
- return -ENOMEM;
- }
- return 0;
-
+ return snmp_mib_init((void**)sctp_statistics, sizeof(struct sctp_mib));
}
-static void cleanup_sctp_mibs(void)
+static inline void cleanup_sctp_mibs(void)
{
- free_percpu(sctp_statistics[0]);
- free_percpu(sctp_statistics[1]);
+ snmp_mib_free((void**)sctp_statistics);
}
static void sctp_v4_pf_init(void)
OpenPOWER on IntegriCloud