char *ip_addr_string(char *buf, char *end, const void *ptr,
struct printf_spec spec, const char *fmt)
{
+ char *err_fmt_msg;
+
switch (fmt[1]) {
case '6':
return ip6_addr_string(buf, end, ptr, spec, fmt);
}}
}
- return ptr_to_id(buf, end, ptr, spec);
+ err_fmt_msg = fmt[0] == 'i' ? "(%pi?)" : "(%pI?)";
+ return string_nocheck(buf, end, err_fmt_msg, spec);
}
static noinline_for_stack
size = sizeof(netdev_features_t);
break;
default:
- return ptr_to_id(buf, end, addr, spec);
+ return string_nocheck(buf, end, "(%pN?)", spec);
}
return special_hex_number(buf, end, num, size);
case 'R':
return rtc_str(buf, end, (const struct rtc_time *)ptr, fmt);
default:
- return ptr_to_id(buf, end, ptr, spec);
+ return string_nocheck(buf, end, "(%ptR?)", spec);
}
}
char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
const char *fmt)
{
- if (!IS_ENABLED(CONFIG_HAVE_CLK) || !clk)
+ if (!IS_ENABLED(CONFIG_HAVE_CLK))
+ return string_nocheck(buf, end, "(%pC?)", spec);
+
+ if (!clk)
return string(buf, end, NULL, spec);
switch (fmt[1]) {
#ifdef CONFIG_COMMON_CLK
return string(buf, end, __clk_get_name(clk), spec);
#else
- return ptr_to_id(buf, end, clk, spec);
+ return string_nocheck(buf, end, "(%pC?)", spec);
#endif
}
}
}
static noinline_for_stack
-char *flags_string(char *buf, char *end, void *flags_ptr, const char *fmt)
+char *flags_string(char *buf, char *end, void *flags_ptr,
+ struct printf_spec spec, const char *fmt)
{
unsigned long flags;
const struct trace_print_flags *names;
names = gfpflag_names;
break;
default:
- WARN_ONCE(1, "Unsupported flags modifier: %c\n", fmt[1]);
- return buf;
+ return string_nocheck(buf, end, "(%pG?)", spec);
}
return format_flags(buf, end, flags, names);
str_spec.field_width = -1;
if (!IS_ENABLED(CONFIG_OF))
- return string_nocheck(buf, end, "(!OF)", spec);
+ return string_nocheck(buf, end, "(%pOF?)", spec);
if ((unsigned long)dn < PAGE_SIZE)
return string_nocheck(buf, end, "(null)", spec);
return device_node_string(buf, end, ptr, spec, fmt + 1);
}
- return ptr_to_id(buf, end, ptr, spec);
+ return string_nocheck(buf, end, "(%pO?)", spec);
}
/*
#endif
case 'G':
- return flags_string(buf, end, ptr, fmt);
+ return flags_string(buf, end, ptr, spec, fmt);
case 'O':
return kobject_string(buf, end, ptr, spec, fmt);
case 'x':