From: YOSHIFUJI Hideaki / 吉藤英明 Date: Wed, 9 Jan 2013 07:19:55 +0000 (+0000) Subject: openvswitch: Use FIELD_SIZEOF() in dp_init(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3523b29bd2cd58432ea1bf3629695ec1ab607722;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git openvswitch: Use FIELD_SIZEOF() in dp_init(). Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index f996db343247..d8c13a965459 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -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");