]> git.baikalelectronics.ru Git - kernel.git/commit
vlan: cleanup the usage of vlan_dev_priv(dev)
authorWang Sheng-Hui <shhuiw@gmail.com>
Sat, 3 Aug 2013 08:54:50 +0000 (16:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Aug 2013 17:32:25 +0000 (10:32 -0700)
commit440c629a4cc5f6ca81e23eb13c089c4b7716a945
treee2777ccf7ad96b9fd9a6b1fdebd7ed5bf2540603
parent7a3add8afe0ebac4e0eb8ad57c4451e44e12cc2d
vlan: cleanup the usage of vlan_dev_priv(dev)

This patch cleanup 2 points for the usage of vlan_dev_priv(dev):
* In vlan_dev.c/vlan_dev_hard_header, we should use the var *vlan directly
  after grabing the pointer at the beginning with
        *vlan = vlan_dev_priv(dev);
  when we need to access the fields of *vlan.
* In vlan.c/register_vlan_device, add the var *vlan pointer
        struct vlan_dev_priv *vlan;
to cleanup the code to access the fields of vlan_dev_priv(new_dev).

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan.c
net/8021q/vlan_dev.c