[PATCH trivial next 8/9] staging: ramster: Use vsprintf extention %pf with builtin_return_address

From: Joe Perches
Date: Tue Feb 28 2012 - 13:51:04 EST


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@xxxxxxxxxxx>
---
drivers/staging/ramster/cluster/heartbeat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ramster/cluster/heartbeat.c b/drivers/staging/ramster/cluster/heartbeat.c
index 0020949..fe1db52 100644
--- a/drivers/staging/ramster/cluster/heartbeat.c
+++ b/drivers/staging/ramster/cluster/heartbeat.c
@@ -398,7 +398,7 @@ int r2hb_register_callback(const char *region_uuid,
up_write(&r2hb_callback_sem);
ret = 0;
out:
- mlog(ML_CLUSTER, "returning %d on behalf of %p for funcs %p\n",
+ mlog(ML_CLUSTER, "returning %d on behalf of %pf for funcs %pf\n",
ret, __builtin_return_address(0), hc);
return ret;
}
@@ -409,7 +409,7 @@ void r2hb_unregister_callback(const char *region_uuid,
{
BUG_ON(hc->hc_magic != R2HB_CB_MAGIC);

- mlog(ML_CLUSTER, "on behalf of %p for funcs %p\n",
+ mlog(ML_CLUSTER, "on behalf of %pf for funcs %pf\n",
__builtin_return_address(0), hc);

/* XXX Can this happen _with_ a region reference? */
--
1.7.8.111.gad25c.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/