On Thu, 26 Sep 2019 15:35:56 +0530
<pbhagavat...@marvell.com> wrote:

> +#define L3FWD_EM_EVENT_MODE                                            \
> +EM_FP(tx_d,          0, 0, L3FWD_EVENT_TX_DIRECT | L3FWD_EVENT_SINGLE) \
> +EM_FP(tx_d_burst,    0, 1, L3FWD_EVENT_TX_DIRECT | L3FWD_EVENT_BURST)  \
> +EM_FP(tx_q,          1, 0, L3FWD_EVENT_TX_ENQ | L3FWD_EVENT_SINGLE)    \
> +EM_FP(tx_q_burst,    1, 1, L3FWD_EVENT_TX_ENQ | L3FWD_EVENT_BURST)     \
> +
> +#define EM_FP(_name, _f2, _f1, flags)                                        
> \
> +int                                                                  \
> +em_event_main_loop_ ## _name(__attribute__((unused)) void *dummy);
> +L3FWD_EM_EVENT_MODE
> +#undef EM_FP

Not a fan of this style of macro programming.

First off, macros should be setup not take a semi-colon at the end.
That is why checkpatch is grumbling about it.

And it is quite opaque to know the result of this template.
Why not just expand it as real code.

Reply via email to