Subject: Re: [PATCH]: Preliminary release of Sun Neptune driver

From: Jeff Garzik <[email-masked]>
Date: Wed, 19 Sep 2007 18:40:05 -0400

David Miller wrote:
>> Macro's that make assumptions about context (ie variable name np)
>> are evil and bad style.
> 
> Too bad, it saves developers who write 20,000 line drivers from carpel
> tunnel symdrome.
> 
> It's so repetitive to state things over and over again, and this macro
> scheme is 1) established widely (tg3 amonst many other drivers do it)
> and 2) forces the driver to use a consistent naming convention for
> primary driver private struct variables.

It also makes review easier -- IMO an important factor.

Which is more clear at a glance:

	status = tr32(MAC_STAT_1);

or

	status = foo_mac_read32(priv, MAC_STAT_1);

?

tg3 and other net drivers show that this technique improves code 
readability.

	Jeff