]> git.karo-electronics.de Git - linux-beck.git/commitdiff
openvswitch: Use FIELD_SIZEOF() in dp_init().
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Wed, 9 Jan 2013 07:19:55 +0000 (07:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jan 2013 07:38:24 +0000 (23:38 -0800)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/datapath.c

index f996db343247aab3b155a27df330252de35761db..d8c13a965459cd60af3a799621ecb4686aefe93b 100644 (file)
@@ -1989,10 +1989,9 @@ static struct pernet_operations ovs_net_ops = {
 
 static int __init dp_init(void)
 {
-       struct sk_buff *dummy_skb;
        int err;
 
-       BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > sizeof(dummy_skb->cb));
+       BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
 
        pr_info("Open vSwitch switching datapath\n");