[openib-general] [PATCH] ib_mad.c: Eliminate macro use
Roland Dreier
roland at topspin.com
Sat Sep 11 08:57:51 PDT 2004
Hal> ib_mad.c: Eliminate macro use
This is definitely good...
Hal> + unsigned long ib_mad_port_list_sflags;
Hal> + unsigned long ib_mad_agent_list_sflags;
but you never need more than one flags variable (you can reuse the
same variable for different locks, and if you're nesting locks, the
inner lock doesn't need a flags variable since you know for sure IRQs
are already disabled). It's not a big deal but it's wasting some
stack space for no reason.
It's probably better just to follow kernel idiom and call the variable
"flags" rather than putting the lock name in as well.
- R.
More information about the general
mailing list