Commit e8d92382dd65a3dd77ff533b09815c3dc65fa9a9
Committed by
Trond Myklebust
1 parent
ba6c05928d
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Showing 3 changed files with 12 additions and 12 deletions Side-by-side Diff
fs/nfs/callback_proc.c
... | ... | @@ -303,14 +303,14 @@ |
303 | 303 | { |
304 | 304 | struct nfs4_slot *slot; |
305 | 305 | |
306 | - dprintk("%s enter. slotid %d seqid %d\n", | |
306 | + dprintk("%s enter. slotid %u seqid %u\n", | |
307 | 307 | __func__, args->csa_slotid, args->csa_sequenceid); |
308 | 308 | |
309 | 309 | if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS) |
310 | 310 | return htonl(NFS4ERR_BADSLOT); |
311 | 311 | |
312 | 312 | slot = tbl->slots + args->csa_slotid; |
313 | - dprintk("%s slot table seqid: %d\n", __func__, slot->seq_nr); | |
313 | + dprintk("%s slot table seqid: %u\n", __func__, slot->seq_nr); | |
314 | 314 | |
315 | 315 | /* Normal */ |
316 | 316 | if (likely(args->csa_sequenceid == slot->seq_nr + 1)) { |
... | ... | @@ -320,7 +320,7 @@ |
320 | 320 | |
321 | 321 | /* Replay */ |
322 | 322 | if (args->csa_sequenceid == slot->seq_nr) { |
323 | - dprintk("%s seqid %d is a replay\n", | |
323 | + dprintk("%s seqid %u is a replay\n", | |
324 | 324 | __func__, args->csa_sequenceid); |
325 | 325 | /* Signal process_op to set this error on next op */ |
326 | 326 | if (args->csa_cachethis == 0) |
... | ... | @@ -521,7 +521,7 @@ |
521 | 521 | if (!cps->clp) /* set in cb_sequence */ |
522 | 522 | goto out; |
523 | 523 | |
524 | - dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n", | |
524 | + dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %u\n", | |
525 | 525 | rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR), |
526 | 526 | args->crsa_target_highest_slotid); |
527 | 527 |
fs/nfs/nfs4proc.c
... | ... | @@ -664,7 +664,7 @@ |
664 | 664 | |
665 | 665 | args->sa_slot = slot; |
666 | 666 | |
667 | - dprintk("<-- %s slotid=%d seqid=%d\n", __func__, | |
667 | + dprintk("<-- %s slotid=%u seqid=%u\n", __func__, | |
668 | 668 | slot->slot_nr, slot->seq_nr); |
669 | 669 | |
670 | 670 | res->sr_slot = slot; |
671 | 671 | |
... | ... | @@ -704,9 +704,9 @@ |
704 | 704 | goto out; |
705 | 705 | } |
706 | 706 | |
707 | - dprintk("--> %s clp %p session %p sr_slot %d\n", | |
707 | + dprintk("--> %s clp %p session %p sr_slot %u\n", | |
708 | 708 | __func__, session->clp, session, res->sr_slot ? |
709 | - res->sr_slot->slot_nr : -1); | |
709 | + res->sr_slot->slot_nr : NFS4_NO_SLOT); | |
710 | 710 | |
711 | 711 | ret = nfs41_setup_sequence(session, args, res, task); |
712 | 712 | out: |
fs/nfs/nfs4session.c
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | nfs4_slot_tbl_drain_complete(tbl); |
77 | 77 | } |
78 | 78 | } |
79 | - dprintk("%s: slotid %u highest_used_slotid %d\n", __func__, | |
79 | + dprintk("%s: slotid %u highest_used_slotid %u\n", __func__, | |
80 | 80 | slotid, tbl->highest_used_slotid); |
81 | 81 | } |
82 | 82 | |
83 | 83 | |
... | ... | @@ -146,9 +146,9 @@ |
146 | 146 | ret->generation = tbl->generation; |
147 | 147 | |
148 | 148 | out: |
149 | - dprintk("<-- %s used_slots=%04lx highest_used=%d slotid=%d \n", | |
149 | + dprintk("<-- %s used_slots=%04lx highest_used=%u slotid=%u\n", | |
150 | 150 | __func__, tbl->used_slots[0], tbl->highest_used_slotid, |
151 | - !IS_ERR(ret) ? ret->slot_nr : -1); | |
151 | + !IS_ERR(ret) ? ret->slot_nr : NFS4_NO_SLOT); | |
152 | 152 | return ret; |
153 | 153 | } |
154 | 154 | |
... | ... | @@ -191,7 +191,7 @@ |
191 | 191 | { |
192 | 192 | int ret; |
193 | 193 | |
194 | - dprintk("--> %s: max_reqs=%u, tbl->max_slots %d\n", __func__, | |
194 | + dprintk("--> %s: max_reqs=%u, tbl->max_slots %u\n", __func__, | |
195 | 195 | max_reqs, tbl->max_slots); |
196 | 196 | |
197 | 197 | if (max_reqs > NFS4_MAX_SLOT_TABLE) |
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 | nfs4_reset_slot_table(tbl, max_reqs - 1, ivalue); |
206 | 206 | spin_unlock(&tbl->slot_tbl_lock); |
207 | 207 | |
208 | - dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__, | |
208 | + dprintk("%s: tbl=%p slots=%p max_slots=%u\n", __func__, | |
209 | 209 | tbl, tbl->slots, tbl->max_slots); |
210 | 210 | out: |
211 | 211 | dprintk("<-- %s: return %d\n", __func__, ret); |