Commit a57abcf4 authored by Alessandro Rubini's avatar Alessandro Rubini

remove unused wrc_extra_debug

The variable was used to mask a few diagnostic messages but was always
set to 1. Since such messages are actually few at this time, remove
the variable altogether.

The code, however, included a hardwired check for servo messages, used
by the ptp-noposix callers.  This commit preserves the behaviour while
removing the dependency from ptp-noposix headers.  The result is ugly
but temporary, because we are going to phase out ptp-noposix.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fcccb34b
#ifndef __FREESTANDING_TRACE_H__
#define __FREESTANDING_TRACE_H__
extern int wrc_extra_debug;
#define TRACE_WRAP(...)
#define TRACE_DEV(...) if(wrc_extra_debug) wrc_debug_printf(0, __VA_ARGS__)
#define TRACE_DEV(...) wrc_debug_printf(0, __VA_ARGS__)
#endif
......@@ -127,8 +127,6 @@ static int wrc_check_link()
return rv;
}
int wrc_extra_debug = 0;
void wrc_debug_printf(int subsys, const char *fmt, ...)
{
va_list ap;
......@@ -138,7 +136,7 @@ void wrc_debug_printf(int subsys, const char *fmt, ...)
va_start(ap, fmt);
if (wrc_extra_debug || (!wrc_extra_debug && (subsys & TRACE_SERVO)))
if (subsys & (1 << 5) /* was: TRACE_SERVO -- see commit message */)
vprintf(fmt, ap);
va_end(ap);
......@@ -236,7 +234,6 @@ static void check_reset(void) {}
int main(void)
{
check_reset();
wrc_extra_debug = 1;
wrc_ui_mode = UI_SHELL_MODE;
_endram = ENDRAM_MAGIC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment