aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-09 02:19:48 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-10 02:38:23 -0500
commitfab25745912a82baa7c9e73f59079108d56b5d26 (patch)
tree12cdf0a2dd72ca03e98d65677c04342345245a14 /net/netlink
parentba96bcbcd213e66306e8669e3442b0b3689dd768 (diff)
netlink: Use FIELD_SIZEOF() in netlink_proto_init().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c0353d55d56f..74827e3b26a1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2185,7 +2185,6 @@ static struct pernet_operations __net_initdata netlink_net_ops = {
2185 2185
2186static int __init netlink_proto_init(void) 2186static int __init netlink_proto_init(void)
2187{ 2187{
2188 struct sk_buff *dummy_skb;
2189 int i; 2188 int i;
2190 unsigned long limit; 2189 unsigned long limit;
2191 unsigned int order; 2190 unsigned int order;
@@ -2194,7 +2193,7 @@ static int __init netlink_proto_init(void)
2194 if (err != 0) 2193 if (err != 0)
2195 goto out; 2194 goto out;
2196 2195
2197 BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb)); 2196 BUILD_BUG_ON(sizeof(struct netlink_skb_parms) > FIELD_SIZEOF(struct sk_buff, cb));
2198 2197
2199 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL); 2198 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
2200 if (!nl_table) 2199 if (!nl_table)