Re: linux-next: Tree for Feb 2 (trace/events/sunrpc.h)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ 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@xxxxxxxxxxx>


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_ */


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


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux