*/
#include <common.h>
-#include <stdarg.h>
+#include <log.h>
#include <serial.h>
+#include <stdarg.h>
#include <linux/ctype.h>
struct printf_info {
out_dgt(info, dgt);
}
-#ifdef CONFIG_SPL_NET_SUPPORT
+#ifdef CONFIG_SPL_NET
static void string(struct printf_info *info, char *s)
{
char ch;
}
break;
#endif
-#ifdef CONFIG_SPL_NET_SUPPORT
+#ifdef CONFIG_SPL_NET
case 'm':
return mac_address_string(info, ptr, false);
case 'M':
}
break;
case 'p':
-#ifdef DEBUG
- pointer(info, fmt, va_arg(va, void *));
- /*
- * Skip this because it pulls in _ctype which is
- * 256 bytes, and we don't generally implement
- * pointer anyway
- */
- while (isalnum(fmt[0]))
- fmt++;
- break;
-#else
+ if (CONFIG_IS_ENABLED(NET) || _DEBUG) {
+ pointer(info, fmt, va_arg(va, void *));
+ /*
+ * Skip this because it pulls in _ctype which is
+ * 256 bytes, and we don't generally implement
+ * pointer anyway
+ */
+ while (isalnum(fmt[0]))
+ fmt++;
+ break;
+ }
islong = true;
/* no break */
-#endif
case 'x':
if (islong) {
num = va_arg(va, unsigned long);