Re: [PATCH] backport: fix netdev destructor backport

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

 



On 18-07-17 15:33, Luca Coelho wrote:
> From: Luca Coelho <luciano.coelho@xxxxxxxxx>
> 
> The commit that changed the netdev destructor was also applied in
> v4.12-rc6, so we need to update the backport.
> 
> Another issue was that when the default free_netdev() destructor was supposed to be used, we would get compilation errors, such as this one in hwsim:

[...]

> Fixes: 721ae78f9355 ("backport: handle change in netdevice destructor usage")

Reviewed-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

> Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
> ---
>  backport/backport-include/linux/netdevice.h | 9 ++++++---
>  patches/0079-netdev-destructor.cocci        | 8 ++++----
>  2 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
> index 98e781eeb740..d22eec2d3113 100644
> --- a/backport/backport-include/linux/netdevice.h
> +++ b/backport/backport-include/linux/netdevice.h
> @@ -320,14 +320,17 @@ static inline void netif_trans_update(struct net_device *dev)
>  }
>  #endif
>  
> -#if LINUX_VERSION_IS_LESS(4,13,0)
> +#if LINUX_VERSION_IS_LESS(4,12,0)
>  #define netdev_set_priv_destructor(_dev, _destructor) \
>  	(_dev)->destructor = __ ## _destructor
> +#define netdev_set_def_destructor(_dev) \
> +	(_dev)->destructor = free_netdev

I tried to stick with one macro, but it is indeed awkward and oviously
incomplete. This looks better.

Thanks,
Arend
--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux