Re: [PATCH 1/2] IB/rxe: make rxe_find_route6 compact

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 25, 2018 at 10:18:01AM -0400, Zhu Yanjun wrote:
> In the file rxe_net.c, to make rxe_find_route6 compact,
> IPV6_CONFIG is moved into the function rxe_find_route6.
> 
> CC: Srinivas Eeda <srinivas.eeda@xxxxxxxxxx>
> CC: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>
> ---
>  drivers/infiniband/sw/rxe/rxe_net.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
> index 159246b..4fc3941 100644
> --- a/drivers/infiniband/sw/rxe/rxe_net.c
> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> @@ -140,11 +140,11 @@ static struct dst_entry *rxe_find_route4(struct net_device *ndev,
>  	return &rt->dst;
>  }
>  
> -#if IS_ENABLED(CONFIG_IPV6)
>  static struct dst_entry *rxe_find_route6(struct net_device *ndev,
>  					 struct in6_addr *saddr,
>  					 struct in6_addr *daddr)
>  {
> +#if IS_ENABLED(CONFIG_IPV6)
>  	struct dst_entry *ndst;
>  	struct flowi6 fl6 = { { 0 } };

Can you just stick

if (!IS_ENABLED(CONFIG_IPv6))
    return NULL;

here and get rid of the ifdef entirely?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux