SUNRPC: Clean up in rpc_show_tasks
authorChuck Lever <chuck.lever@oracle.com>
Tue, 11 Sep 2007 22:00:25 +0000 (18:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:16:45 +0000 (17:16 -0400)
/home/cel/linux/net/sunrpc/clnt.c: In function ‘rpc_show_tasks’:
/home/cel/linux/net/sunrpc/clnt.c:1538: warning:
signed and unsigned type in conditional expression

This points out another case where a conditional expression returns a
signed value in one arm and an unsigned value in the other.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/clnt.c

index 0357819ffdb0ee865ebcc0ced755fa67b13d846f..7a7cd3b7accec40d5a2033e18e2d4f082e25ddc5 100644 (file)
@@ -1526,13 +1526,18 @@ void rpc_show_tasks(void)
                spin_lock(&clnt->cl_lock);
                list_for_each_entry(t, &clnt->cl_tasks, tk_task) {
                        const char *rpc_waitq = "none";
+                       int proc;
+
+                       if (t->tk_msg.rpc_proc)
+                               proc = t->tk_msg.rpc_proc->p_proc;
+                       else
+                               proc = -1;
 
                        if (RPC_IS_QUEUED(t))
                                rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq);
 
                        printk("%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n",
-                               t->tk_pid,
-                               (t->tk_msg.rpc_proc ? t->tk_msg.rpc_proc->p_proc : -1),
+                               t->tk_pid, proc,
                                t->tk_flags, t->tk_status,
                                t->tk_client,
                                (t->tk_client ? t->tk_client->cl_prog : 0),