tools lib traceevent: Convert remaining %p[fF] users to %p[sS]
There are no in-kernel %p[fF] users left. Convert the traceevent tool, too, to align with the kernel. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: devicetree@vger.kernel.org Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Joe Perches <joe@perches.com> Cc: linux-acpi@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Cc: Namhyung Kim <namhyung@kernel.org> Cc: Petr Mladek <pmladek@suse.com> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Rob Herring <robh@kernel.org> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Tzvetomir Stoyanov <tstoyanov@vmware.com> Link: http://lore.kernel.org/lkml/20190918133419.7969-2-sakari.ailus@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
055c67ed39
commit
b295c3e39c
@@ -4367,10 +4367,20 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
|
||||
switch (*ptr) {
|
||||
case 's':
|
||||
case 'S':
|
||||
case 'f':
|
||||
case 'F':
|
||||
case 'x':
|
||||
break;
|
||||
case 'f':
|
||||
case 'F':
|
||||
/*
|
||||
* Pre-5.5 kernels use %pf and
|
||||
* %pF for printing symbols
|
||||
* while kernels since 5.5 use
|
||||
* %pfw for fwnodes. So check
|
||||
* %p[fF] isn't followed by 'w'.
|
||||
*/
|
||||
if (ptr[1] != 'w')
|
||||
break;
|
||||
/* fall through */
|
||||
default:
|
||||
/*
|
||||
* Older kernels do not process
|
||||
@@ -4487,12 +4497,12 @@ get_bprint_format(void *data, int size __maybe_unused,
|
||||
|
||||
printk = find_printk(tep, addr);
|
||||
if (!printk) {
|
||||
if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0)
|
||||
if (asprintf(&format, "%%ps: (NO FORMAT FOUND at %llx)\n", addr) < 0)
|
||||
return NULL;
|
||||
return format;
|
||||
}
|
||||
|
||||
if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0)
|
||||
if (asprintf(&format, "%s: %s", "%ps", printk->printk) < 0)
|
||||
return NULL;
|
||||
|
||||
return format;
|
||||
|
Reference in New Issue
Block a user