diff options
author | Roland Dreier <roland@purestorage.com> | 2014-01-19 18:18:49 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-19 18:18:49 -0500 |
commit | 27cdef637c25705b433d5c4deeef4cf8dcb75d6a (patch) | |
tree | f11300763594c54826e7d2990071e7818c5e8efb /drivers/infiniband/hw | |
parent | 9392fa06411cf93885c4cafc8058085d98f52fec (diff) |
IB/mlx4: Use IS_ENABLED(CONFIG_IPV6)
...instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index a776aabab44a..bf218d9ec089 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -1430,7 +1430,7 @@ static int mlx4_ib_inet_event(struct notifier_block *this, unsigned long event, | |||
1430 | return NOTIFY_DONE; | 1430 | return NOTIFY_DONE; |
1431 | } | 1431 | } |
1432 | 1432 | ||
1433 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1433 | #if IS_ENABLED(CONFIG_IPV6) |
1434 | static int mlx4_ib_inet6_event(struct notifier_block *this, unsigned long event, | 1434 | static int mlx4_ib_inet6_event(struct notifier_block *this, unsigned long event, |
1435 | void *ptr) | 1435 | void *ptr) |
1436 | { | 1436 | { |
@@ -1450,7 +1450,7 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1450 | struct mlx4_ib_dev *ibdev, u8 port) | 1450 | struct mlx4_ib_dev *ibdev, u8 port) |
1451 | { | 1451 | { |
1452 | struct in_device *in_dev; | 1452 | struct in_device *in_dev; |
1453 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1453 | #if IS_ENABLED(CONFIG_IPV6) |
1454 | struct inet6_dev *in6_dev; | 1454 | struct inet6_dev *in6_dev; |
1455 | union ib_gid *pgid; | 1455 | union ib_gid *pgid; |
1456 | struct inet6_ifaddr *ifp; | 1456 | struct inet6_ifaddr *ifp; |
@@ -1473,7 +1473,7 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1473 | endfor_ifa(in_dev); | 1473 | endfor_ifa(in_dev); |
1474 | in_dev_put(in_dev); | 1474 | in_dev_put(in_dev); |
1475 | } | 1475 | } |
1476 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1476 | #if IS_ENABLED(CONFIG_IPV6) |
1477 | /* IPv6 gids */ | 1477 | /* IPv6 gids */ |
1478 | in6_dev = in6_dev_get(dev); | 1478 | in6_dev = in6_dev_get(dev); |
1479 | if (in6_dev) { | 1479 | if (in6_dev) { |
@@ -1874,7 +1874,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) | |||
1874 | goto err_notif; | 1874 | goto err_notif; |
1875 | } | 1875 | } |
1876 | } | 1876 | } |
1877 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1877 | #if IS_ENABLED(CONFIG_IPV6) |
1878 | if (!iboe->nb_inet6.notifier_call) { | 1878 | if (!iboe->nb_inet6.notifier_call) { |
1879 | iboe->nb_inet6.notifier_call = mlx4_ib_inet6_event; | 1879 | iboe->nb_inet6.notifier_call = mlx4_ib_inet6_event; |
1880 | err = register_inet6addr_notifier(&iboe->nb_inet6); | 1880 | err = register_inet6addr_notifier(&iboe->nb_inet6); |
@@ -1921,7 +1921,7 @@ err_notif: | |||
1921 | pr_warn("failure unregistering notifier\n"); | 1921 | pr_warn("failure unregistering notifier\n"); |
1922 | ibdev->iboe.nb_inet.notifier_call = NULL; | 1922 | ibdev->iboe.nb_inet.notifier_call = NULL; |
1923 | } | 1923 | } |
1924 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1924 | #if IS_ENABLED(CONFIG_IPV6) |
1925 | if (ibdev->iboe.nb_inet6.notifier_call) { | 1925 | if (ibdev->iboe.nb_inet6.notifier_call) { |
1926 | if (unregister_inet6addr_notifier(&ibdev->iboe.nb_inet6)) | 1926 | if (unregister_inet6addr_notifier(&ibdev->iboe.nb_inet6)) |
1927 | pr_warn("failure unregistering notifier\n"); | 1927 | pr_warn("failure unregistering notifier\n"); |
@@ -1976,7 +1976,7 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr) | |||
1976 | pr_warn("failure unregistering notifier\n"); | 1976 | pr_warn("failure unregistering notifier\n"); |
1977 | ibdev->iboe.nb_inet.notifier_call = NULL; | 1977 | ibdev->iboe.nb_inet.notifier_call = NULL; |
1978 | } | 1978 | } |
1979 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1979 | #if IS_ENABLED(CONFIG_IPV6) |
1980 | if (ibdev->iboe.nb_inet6.notifier_call) { | 1980 | if (ibdev->iboe.nb_inet6.notifier_call) { |
1981 | if (unregister_inet6addr_notifier(&ibdev->iboe.nb_inet6)) | 1981 | if (unregister_inet6addr_notifier(&ibdev->iboe.nb_inet6)) |
1982 | pr_warn("failure unregistering notifier\n"); | 1982 | pr_warn("failure unregistering notifier\n"); |