From f3d85db38e04bd994fa6f16ac6270ac0361340e5 Mon Sep 17 00:00:00 2001 From: YOSHIFUJI Hideaki Date: Thu, 10 Jan 2013 09:41:16 -0800 Subject: [PATCH] datapath: Use FIELD_SIZEOF() in dp_init(). Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Jesse Gross --- datapath/datapath.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 14c5c540c..ed69af808 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -2091,10 +2091,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 %s, built "__DATE__" "__TIME__"\n", VERSION); -- 2.43.0