On 03/12/14 08:41, Taras Kondratiuk wrote:
On 12/02/2014 07:50 PM, Zoltan Kiss wrote:


On 02/12/14 17:07, Taras Kondratiuk wrote:
On 12/02/2014 06:42 PM, Zoltan Kiss wrote:
Hi,

At the moment, the careless developer look at "enum odp_log_level" and
starts using ODP_LOG(ODP_LOG_DBG, ...) instead of ODP_DBG.
I think it would be good to provide either ODP_LOG(loglevel, ...) or
ODP_[loglevel](...), but not both.

These are internal functions, so it is up to a platform
developer/maintainer to decide how he want to use them.

platform/linux-generic/include/api/odp_debug.h can be used by
applications, as my recent patch showed, the OVS interface does that for
example.

That is a mistake. We agreed that these functions are not public and can
be used only inside of platform implementation.
We should move them to odp_debug_internal.h to avoid confusions.
The only thing that should stay in odp_debug.h it a declaration of
odp_override_log().
Yeah, I agree with the moving, it shouldn't be accessible to applications.


And this problem applies to ODP_LOG_ABORT as well: ODP_ABORT
will call abort(), while ODP_LOG(ODP_LOG_ABORT, ...) doesn't.
I think you can just drop the wholw ODP_LOG macro completely, as far as
I see nothing uses it anymore.

ODP_LOG is used as helper macro. If you wish I can call it _ODP_LOG, but
honestly I don't see a real reason to do it.
I mean ODP_LOG is used now twice, in ODP_DBG and ODP_ABORT, to add (__FILE__, __LINE__, __func__) to the string. In the meantime ODP_PRINT and ODP_UNIMPLEMENTED calls odp_override_log directly. I think we should just ditch ODP_LOG and call odp_override_log directly from everywhere, so noone gets tempted to use it in a platform implementation.

Zoli

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to