[net-next,4/6] openvswitch: Use FIELD_SIZEOF() in dp_init().

Submitted by YOSHIFUJI Hideaki / 吉藤英明 on Jan. 9, 2013, 5:19 p.m.

Details

Message ID 50EDA6BB.3030304@linux-ipv6.org
State Accepted
Delegated to: David Miller
Headers show

Commit Message

YOSHIFUJI Hideaki / 吉藤英明 Jan. 9, 2013, 5:19 p.m.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
 net/openvswitch/datapath.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index f996db3..d8c13a9 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");