On Jul 22, 2013, at 3:03 PM, "Myklebust, Trond" <Trond.Myklebust@xxxxxxxxxx> wrote: > On Fri, 2013-07-12 at 12:32 -0400, Chuck Lever wrote: >> Clean up. Squelch compiler warning: >> >> linux/fs/nfs/nfs4proc.c: In function ‘nfs4_setup_sequence’: >> linux/fs/nfs/nfs4proc.c:703:2: warning: signed and unsigned type in >> conditional expression [-Wsign-compare] >> >> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> >> --- >> fs/nfs/nfs4proc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >> index 7b2e008..5913e1d 100644 >> --- a/fs/nfs/nfs4proc.c >> +++ b/fs/nfs/nfs4proc.c >> @@ -655,7 +655,7 @@ static int nfs4_setup_sequence(const struct nfs_server *server, >> >> dprintk("--> %s clp %p session %p sr_slot %d\n", >> __func__, session->clp, session, res->sr_slot ? >> - res->sr_slot->slot_nr : -1); >> + (int)res->sr_slot->slot_nr : -1); >> > > Please convert to make it unsigned, and to use NFS4_NO_SLOT instead of > '-1'. NFS4_NO_SLOT makes sense, but I'm not clear on "make it unsigned". Leaving the format as "%d" allows NFS4_NO_SLOT to be displayed as "-1". So, something like the following one-liner will address the compiler warning, and leave behavior unchanged: - res->sr_slot->slot_nr : -1); + res->sr_slot->slot_nr : NFS4_NO_SLOT); That is, unless you prefer NFS4_NO_SLOT displayed in some other way? -- Chuck Lever chuck[dot]lever[at]oracle[dot]com -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html