Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NLM: Fix sparse warnings

- fs/lockd/xdr4.c:140:27: warning: incorrect type in argument 2 (different
explicit signedness)
- fs/lockd/xdr4.c:141:27: warning: incorrect type in argument 2 (different
explicit signedness)
- fs/lockd/xdr4.c:432:28: warning: incorrect type in argument 2 (different
explicit signedness)
- fs/lockd/xdr4.c:433:28: warning: incorrect type in argument 2 (different
explicit signedness)
- fs/lockd/xdr4.c:587:20: warning: symbol 'nlm_version4' was not declared.
Should it be static?

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+5 -6
-4
fs/lockd/xdr.c
··· 586 586 .procs = nlm_procedures, 587 587 }; 588 588 589 - #ifdef CONFIG_LOCKD_V4 590 - extern struct rpc_version nlm_version4; 591 - #endif 592 - 593 589 static struct rpc_version * nlm_versions[] = { 594 590 [1] = &nlm_version1, 595 591 [3] = &nlm_version3,
+4 -2
fs/lockd/xdr4.c
··· 123 123 nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) 124 124 { 125 125 struct file_lock *fl = &lock->fl; 126 - __s64 len, start, end; 126 + __u64 len, start; 127 + __s64 end; 127 128 128 129 if (!(p = xdr_decode_string_inplace(p, &lock->caller, 129 130 &lock->len, NLM_MAXSTRLEN)) ··· 418 417 if (resp->status == nlm_lck_denied) { 419 418 struct file_lock *fl = &resp->lock.fl; 420 419 u32 excl; 421 - s64 start, end, len; 420 + __u64 start, len; 421 + __s64 end; 422 422 423 423 memset(&resp->lock, 0, sizeof(resp->lock)); 424 424 locks_init_lock(fl);
+1
include/linux/lockd/xdr4.h
··· 42 42 int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); 43 43 int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); 44 44 */ 45 + extern struct rpc_version nlm_version4; 45 46 46 47 #endif /* LOCKD_XDR4_H */