lkml.org 
[lkml]   [2012]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: linux-next: Tree for Feb 2 (trace/events/sunrpc.h)
From
Date
[ Added the person responsible for this ]

On Thu, 2012-02-02 at 10:10 -0800, Randy Dunlap wrote:
> On 02/01/2012 07:45 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20120201:
>
>
>
> include/trace/events/sunrpc.h:69:1: error: implicit declaration of function 'rpc_qname'
> include/trace/events/sunrpc.h:69:1: warning: format '%s' expects type 'char *', but argument 9 has type 'int'

This has actually nothing to do with the tracepoint itself. The bug is
with the rpc_qname().

The tracepoint references rpc_qname() and in
include/linux/sunrpc/sched.h:


#ifdef RPC_DEBUG
static inline const char * rpc_qname(const struct rpc_wait_queue *q)
{
return ((q && q->name) ? q->name : "unknown");
}
#endif

Your config had RPC_DEBUG not set, thus the function was not defined.


The below patch fixes the problem with the side effect that the trace
data will contain "unknown" for all references to rcu_qname().

-- Steve

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index f7b2df5..c89ba95 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -275,6 +275,11 @@ static inline const char * rpc_qname(const struct rpc_wait_queue *q)
{
return ((q && q->name) ? q->name : "unknown");
}
+#else
+static inline const char * rpc_qname(const struct rpc_wait_queue *q)
+{
+ return "unknown";
+}
#endif

#endif /* _LINUX_SUNRPC_SCHED_H_ */



\
 
 \ /
  Last update: 2012-02-09 03:39    [W:1.997 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site