[ofa-general] Re: [PATCH RFC] opensm: drop unused parameter in OSM_LOG_ENTER macro
Sasha Khapyorsky
sashak at voltaire.com
Sat Feb 16 09:13:58 PST 2008
Hi Hal,
On 07:37 Sat 16 Feb , Hal Rosenstock wrote:
>
> This seems functionally equivalent as all functions supplied in second
> parameter to OSM_LOG_ENTER are indeed the function being entered.
Correct, it is the same. The only downside I can see here is needs to
update some ibutils/ibis files too. Of course I can supply the patch.
> > #define OSM_LOG(log, level, fmt, arg...) osm_log(log, level, \
> > "%s: " fmt , __func__, ##arg)
> >
> > , and use this macro instead of osm_log() where function name should be
> > logged?
>
> Do all instances of osm_log use the function they are in ? For those
> that do, this seems fine but I'm not sure all of them do.
Good point. And there is a good solution for this - those osm_log()
calls where function name is used (or should be used) will be converted
to OSM_LOG(), the rest will use osm_log() as usual. Sounds good?
Sasha
More information about the general
mailing list