Subject: Re: [PATCH 1/1 V4] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver

From: Stephen Hemminger <[email-masked]>
Date: Mon, 25 Jan 2010 08:37:59 -0800

On Mon, 25 Jan 2010 12:01:12 +0100
Kristoffer Glembo <[email-masked]> wrote:

> +/* Wait for a register change with a timeout, jiffies used has time reference */
> +#define wait_loop(wait_statement, timeout, label_on_timeout, arg_on_timeout) \
> +	{ \
> +		unsigned long _timeout = jiffies + HZ/100*timeout; \
> +		while (wait_statement) { \
> +			if (time_after(jiffies, _timeout)) { \
> +				arg_on_timeout; \
> +goto label_on_timeout; \
> +			} \
> +		} \
> +	}

Ugly macro used with same arguments, just write a single function

--