Subject: Re: Subject: [PATCH 5/6] bna: Brocade 10Gb Ethernet device driver

From: Stephen Hemminger <[email-masked]>
Date: Thu, 12 Nov 2009 21:03:15 -0800

On Thu, 12 Nov 2009 19:46:52 -0800
Rasesh Mody <[email-masked]> wrote:

> +#define bfa_cb_queue(__bfa, __hcb_qe, __cbfn, __cbarg) do {		\
> +	(__hcb_qe)->cbfn  = (__cbfn);      \
> +	(__hcb_qe)->cbarg = (__cbarg);      \
> +	list_add_tail(&(__hcb_qe)->qe, &(__bfa)->comp_q);      \
> +} while (0)
> +
> +#define bfa_cb_dequeue(__hcb_qe)	list_del(&(__hcb_qe)->qe)
> +
> +#define bfa_cb_queue_once(__bfa, __hcb_qe, __cbfn, __cbarg) do {	\
> +	(__hcb_qe)->cbfn  = (__cbfn);      \
> +	(__hcb_qe)->cbarg = (__cbarg);      \
> +	if (!(__hcb_qe)->once) {      \
> +		list_add_tail((__hcb_qe), &(__bfa)->comp_q);      \
> +		(__hcb_qe)->once = true;				\
> +	}								\
> +} while (0)
> +
> +#define bfa_cb_queue_done(__hcb_qe) do {				\
> +	(__hcb_qe)->once = false;					\
> +} while (0)
> +

Could these be inline functions or are they typeless macros?

--