Skip to contentSkip to conversation

openvswitch: Use FIELD_SIZEOF() in dp_init().

PATCH In review YOSHIFUJI Hideaki 1 participant 1 message Jan 9, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/6 openvswitch: Use FIELD_SIZEOF() in dp_init().

---
 net/openvswitch/datapath.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/openvswitch/datapath.c +1 -2
index f996db3..d8c13a9 100644
@@ -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");
 
Signature · 1 line
1.7.9.5