On Wed, 2014-04-23 at 12:27 +0200, Stefan Assmann wrote:

> I'm trying to generate a patch to define a function with different
> arguments depending on the kernel version. I'm having some difficulties,
> maybe you can tell me what's wrong with the following approach.

I can't answer that, but given the premise

> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
>         vlan_rx_add_vid_func(a, b, c)
> +#else
> +       vlan_rx_add_vid_func(a, c)
> +#endif

and the fact that later kernel versions add an argument, wouldn't it be
much easier to provide a macro in the appropriate header file:

#define vlan_rx_add_vid_func(a,b,c) vlan_rx_add_vid_func(a,c)

johannes

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to