[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100125083759.3392e2ff@nehalam>
Date: Mon, 25 Jan 2010 08:37:59 -0800
From: Stephen Hemminger <shemminger@...tta.com>
To: Kristoffer Glembo <kristoffer@...sler.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
Kristoffer Glembo <kristoffer@...sler.com>
Subject: Re: [PATCH 1/1 V4] net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC
driver
On Mon, 25 Jan 2010 12:01:12 +0100
Kristoffer Glembo <kristoffer@...sler.com> 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
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists