提交 f4d5392e 编写于 作者: A Amerigo Wang 提交者: David S. Miller

vlan: use IS_ENABLED()

#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)

can be replaced by

#if IS_ENABLED(CONFIG_FOO)

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: NCong Wang <amwang@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 07a93626
...@@ -294,7 +294,7 @@ static void vlan_transfer_features(struct net_device *dev, ...@@ -294,7 +294,7 @@ static void vlan_transfer_features(struct net_device *dev,
else else
vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN; vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN;
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #if IS_ENABLED(CONFIG_FCOE)
vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
#endif #endif
......
...@@ -409,7 +409,7 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa) ...@@ -409,7 +409,7 @@ static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa)
return err; return err;
} }
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #if IS_ENABLED(CONFIG_FCOE)
static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid, static int vlan_dev_fcoe_ddp_setup(struct net_device *dev, u16 xid,
struct scatterlist *sgl, unsigned int sgc) struct scatterlist *sgl, unsigned int sgc)
{ {
...@@ -564,7 +564,7 @@ static int vlan_dev_init(struct net_device *dev) ...@@ -564,7 +564,7 @@ static int vlan_dev_init(struct net_device *dev)
if (is_zero_ether_addr(dev->broadcast)) if (is_zero_ether_addr(dev->broadcast))
memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len); memcpy(dev->broadcast, real_dev->broadcast, dev->addr_len);
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #if IS_ENABLED(CONFIG_FCOE)
dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid; dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid;
#endif #endif
...@@ -741,7 +741,7 @@ static const struct net_device_ops vlan_netdev_ops = { ...@@ -741,7 +741,7 @@ static const struct net_device_ops vlan_netdev_ops = {
.ndo_do_ioctl = vlan_dev_ioctl, .ndo_do_ioctl = vlan_dev_ioctl,
.ndo_neigh_setup = vlan_dev_neigh_setup, .ndo_neigh_setup = vlan_dev_neigh_setup,
.ndo_get_stats64 = vlan_dev_get_stats64, .ndo_get_stats64 = vlan_dev_get_stats64,
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #if IS_ENABLED(CONFIG_FCOE)
.ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup, .ndo_fcoe_ddp_setup = vlan_dev_fcoe_ddp_setup,
.ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done, .ndo_fcoe_ddp_done = vlan_dev_fcoe_ddp_done,
.ndo_fcoe_enable = vlan_dev_fcoe_enable, .ndo_fcoe_enable = vlan_dev_fcoe_enable,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册