Jes Sorensen wrote:
> I don't like the way you declare all the code in obscure macros in
> +#define DECLARE_CHG_MTU(suffix,low,high) \
> + static int suffix##_change_mtu(struct net_device *dev, int new_mtu) \
> All it does is to make the code harder to read and debug for little/no
I disagree, but you probably knew that when you saw the code :)
These macros are not used inside code, they declare entire functions.
These functions are 100% duplicated across 2-4 protocols. Duplicated
code means bugs in some portions of the code and no others, more
difficult to maintain, etc. I even proved this point while developing
the patch -- one of the functions was missing an EXPORT_xxx symbol.
Using a standard macro automatically fixed this, a small oversight that
had been in the kernel probably for over a year.
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie