Commit e8d92382 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

NFS: When displaying session slot numbers, use "%u" consistently

Clean up, since slot and sequence numbers are all unsigned anyway.

Among other things, squelch compiler warnings:

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]

and

linux/fs/nfs/nfs4session.c: In function ‘nfs4_alloc_slot’:
linux/fs/nfs/nfs4session.c:151:31: warning: signed and unsigned type in
	conditional expression [-Wsign-compare]
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ba6c0592
...@@ -303,14 +303,14 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) ...@@ -303,14 +303,14 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
{ {
struct nfs4_slot *slot; struct nfs4_slot *slot;
dprintk("%s enter. slotid %d seqid %d\n", dprintk("%s enter. slotid %u seqid %u\n",
__func__, args->csa_slotid, args->csa_sequenceid); __func__, args->csa_slotid, args->csa_sequenceid);
if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS) if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS)
return htonl(NFS4ERR_BADSLOT); return htonl(NFS4ERR_BADSLOT);
slot = tbl->slots + args->csa_slotid; slot = tbl->slots + args->csa_slotid;
dprintk("%s slot table seqid: %d\n", __func__, slot->seq_nr); dprintk("%s slot table seqid: %u\n", __func__, slot->seq_nr);
/* Normal */ /* Normal */
if (likely(args->csa_sequenceid == slot->seq_nr + 1)) { if (likely(args->csa_sequenceid == slot->seq_nr + 1)) {
...@@ -320,7 +320,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) ...@@ -320,7 +320,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
/* Replay */ /* Replay */
if (args->csa_sequenceid == slot->seq_nr) { if (args->csa_sequenceid == slot->seq_nr) {
dprintk("%s seqid %d is a replay\n", dprintk("%s seqid %u is a replay\n",
__func__, args->csa_sequenceid); __func__, args->csa_sequenceid);
/* Signal process_op to set this error on next op */ /* Signal process_op to set this error on next op */
if (args->csa_cachethis == 0) if (args->csa_cachethis == 0)
...@@ -521,7 +521,7 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy, ...@@ -521,7 +521,7 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
if (!cps->clp) /* set in cb_sequence */ if (!cps->clp) /* set in cb_sequence */
goto out; goto out;
dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n", dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %u\n",
rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR), rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR),
args->crsa_target_highest_slotid); args->crsa_target_highest_slotid);
......
...@@ -664,7 +664,7 @@ int nfs41_setup_sequence(struct nfs4_session *session, ...@@ -664,7 +664,7 @@ int nfs41_setup_sequence(struct nfs4_session *session,
args->sa_slot = slot; args->sa_slot = slot;
dprintk("<-- %s slotid=%d seqid=%d\n", __func__, dprintk("<-- %s slotid=%u seqid=%u\n", __func__,
slot->slot_nr, slot->seq_nr); slot->slot_nr, slot->seq_nr);
res->sr_slot = slot; res->sr_slot = slot;
...@@ -704,9 +704,9 @@ int nfs4_setup_sequence(const struct nfs_server *server, ...@@ -704,9 +704,9 @@ int nfs4_setup_sequence(const struct nfs_server *server,
goto out; goto out;
} }
dprintk("--> %s clp %p session %p sr_slot %d\n", dprintk("--> %s clp %p session %p sr_slot %u\n",
__func__, session->clp, session, res->sr_slot ? __func__, session->clp, session, res->sr_slot ?
res->sr_slot->slot_nr : -1); res->sr_slot->slot_nr : NFS4_NO_SLOT);
ret = nfs41_setup_sequence(session, args, res, task); ret = nfs41_setup_sequence(session, args, res, task);
out: out:
......
...@@ -76,7 +76,7 @@ void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot) ...@@ -76,7 +76,7 @@ void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot)
nfs4_slot_tbl_drain_complete(tbl); nfs4_slot_tbl_drain_complete(tbl);
} }
} }
dprintk("%s: slotid %u highest_used_slotid %d\n", __func__, dprintk("%s: slotid %u highest_used_slotid %u\n", __func__,
slotid, tbl->highest_used_slotid); slotid, tbl->highest_used_slotid);
} }
...@@ -146,9 +146,9 @@ struct nfs4_slot *nfs4_alloc_slot(struct nfs4_slot_table *tbl) ...@@ -146,9 +146,9 @@ struct nfs4_slot *nfs4_alloc_slot(struct nfs4_slot_table *tbl)
ret->generation = tbl->generation; ret->generation = tbl->generation;
out: out:
dprintk("<-- %s used_slots=%04lx highest_used=%d slotid=%d \n", dprintk("<-- %s used_slots=%04lx highest_used=%u slotid=%u\n",
__func__, tbl->used_slots[0], tbl->highest_used_slotid, __func__, tbl->used_slots[0], tbl->highest_used_slotid,
!IS_ERR(ret) ? ret->slot_nr : -1); !IS_ERR(ret) ? ret->slot_nr : NFS4_NO_SLOT);
return ret; return ret;
} }
...@@ -191,7 +191,7 @@ static int nfs4_realloc_slot_table(struct nfs4_slot_table *tbl, ...@@ -191,7 +191,7 @@ static int nfs4_realloc_slot_table(struct nfs4_slot_table *tbl,
{ {
int ret; int ret;
dprintk("--> %s: max_reqs=%u, tbl->max_slots %d\n", __func__, dprintk("--> %s: max_reqs=%u, tbl->max_slots %u\n", __func__,
max_reqs, tbl->max_slots); max_reqs, tbl->max_slots);
if (max_reqs > NFS4_MAX_SLOT_TABLE) if (max_reqs > NFS4_MAX_SLOT_TABLE)
...@@ -205,7 +205,7 @@ static int nfs4_realloc_slot_table(struct nfs4_slot_table *tbl, ...@@ -205,7 +205,7 @@ static int nfs4_realloc_slot_table(struct nfs4_slot_table *tbl,
nfs4_reset_slot_table(tbl, max_reqs - 1, ivalue); nfs4_reset_slot_table(tbl, max_reqs - 1, ivalue);
spin_unlock(&tbl->slot_tbl_lock); spin_unlock(&tbl->slot_tbl_lock);
dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__, dprintk("%s: tbl=%p slots=%p max_slots=%u\n", __func__,
tbl, tbl->slots, tbl->max_slots); tbl, tbl->slots, tbl->max_slots);
out: out:
dprintk("<-- %s: return %d\n", __func__, ret); dprintk("<-- %s: return %d\n", __func__, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment