Subject: Re: [PATCHv2 NEXT 2/8] qlcnic: fix eswitch stats

From: Stephen Hemminger <[email-masked]>
Date: Mon, 11 Apr 2011 16:09:46 -0700

On Mon,  4 Oct 2010 08:14:51 -0700
Amit Kumar Salecha <[email-masked]> wrote:

> +
> +#define QLCNIC_ADD_ESW_STATS(VAL1, VAL2)\
> +do {	\
> +	if (((VAL1) == QLCNIC_ESW_STATS_NOT_AVAIL) && \
> +	    ((VAL2) != QLCNIC_ESW_STATS_NOT_AVAIL)) \
> +		(VAL1) = (VAL2); \
> +	else if (((VAL1) != QLCNIC_ESW_STATS_NOT_AVAIL) && \
> +		 ((VAL2) != QLCNIC_ESW_STATS_NOT_AVAIL)) \
> +			(VAL1) += (VAL2); \
> +} while (0)

Fugly macro. Make it an inline function?