Skip to content

Commit

Permalink
gadget: Use vsprintf extention %pf with builtin_return_address
Browse files Browse the repository at this point in the history
Emit the function name not the address when possible.

builtin_return_address() gives an address.  When building
a kernel with CONFIG_KALLSYMS, emit the actual function
name not the address.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Joe Perches authored and Jiri Kosina committed Apr 6, 2012
1 parent 2975b02 commit bfa346a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/u_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ static int gs_put_char(struct tty_struct *tty, unsigned char ch)
unsigned long flags;
int status;

pr_vdebug("gs_put_char: (%d,%p) char=0x%x, called from %p\n",
pr_vdebug("gs_put_char: (%d,%p) char=0x%x, called from %pf\n",
port->port_num, tty, ch, __builtin_return_address(0));

spin_lock_irqsave(&port->port_lock, flags);
Expand Down

0 comments on commit bfa346a

Please sign in to comment.