Re: [PATCHv3 1/2] B/rxe: make rxe_find_route6 compact

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

 



On Sat, 2018-03-31 at 00:18 -0400, Zhu Yanjun wrote:
> -#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 } };
>  
> @@ -168,20 +168,10 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev,
>  	return ndst;
>  put:
>  	dst_release(ndst);
> +#endif
>  	return NULL;
>  }
>  
> -#else
> -
> -static struct dst_entry *rxe_find_route6(struct net_device *ndev,
> -					 struct in6_addr *saddr,
> -					 struct in6_addr *daddr)
> -{
> -	return NULL;
> -}
> -
> -#endif

Is this patch more than code churn?

This patch changes code that conforms to the kernel coding standard into
code that no longer conforms to the kernel coding standard. A quote from 
Documentation/process/coding-style.rst: "Prefer to compile out entire
functions, rather than portions of functions or portions of
expressions.  Rather than putting an ifdef in an expression, factor out part
or all of the expression into a separate helper function and apply the 
conditional to that function."

Hence please drop this patch.

Thanks,

Bart.



��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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