Skip to content

Commit

Permalink
openvswitch: Use FIELD_SIZEOF() in dp_init().
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 10, 2013
1 parent fab2574 commit 3523b29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 3523b29

Please sign in to comment.