diff options
author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-07-12 21:16:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-12 21:16:47 -0700 |
commit | 486198fbfff7a410702ef109a0aabe8e7562df5b (patch) | |
tree | 9bc1b381a890acee98293d63371a47fca9cb3b0a /fs | |
parent | 8a4ba9cfd11b63a49d360e2714a59d4a539a88d2 (diff) | |
download | history-486198fbfff7a410702ef109a0aabe8e7562df5b.tar.gz |
[PATCH] sparse: more fs/* NULL noise removal
(partially based on patch from Mika Kukkonen)
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext2/xattr.c | 3 | ||||
-rw-r--r-- | fs/jffs/jffs_fm.c | 5 | ||||
-rw-r--r-- | fs/lockd/xdr4.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 41 |
5 files changed, 28 insertions, 27 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index abefa1c4ce700b..85ee4e8bee0ec4 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -772,7 +772,8 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, s_first_data_block) + EXT2_I(inode)->i_block_group * EXT2_BLOCKS_PER_GROUP(sb); - int block = ext2_new_block(inode, goal, 0, 0, &error); + int block = ext2_new_block(inode, goal, + NULL, NULL, &error); if (error) goto cleanup; ea_idebug(inode, "creating block %d", block); diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c index 1597328f01cefc..fae439d48398ac 100644 --- a/fs/jffs/jffs_fm.c +++ b/fs/jffs/jffs_fm.c @@ -114,10 +114,9 @@ void jffs_cleanup_fmcontrol(struct jffs_fmcontrol *fmc) { if (fmc) { - struct jffs_fm *cur; struct jffs_fm *next = fmc->head; - - while ((cur = next)) { + while (next) { + struct jffs_fm *cur = next; next = next->next; jffs_free_fm(cur); } diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c index 389aadcd92087b..10562d31f07391 100644 --- a/fs/lockd/xdr4.c +++ b/fs/lockd/xdr4.c @@ -191,7 +191,7 @@ nlm4_encode_testres(u32 *p, struct nlm_res *resp) dprintk("xdr: before encode_testres (p %p resp %p)\n", p, resp); if (!(p = nlm4_encode_cookie(p, &resp->cookie))) - return 0; + return NULL; *p++ = resp->status; if (resp->status == nlm_lck_denied) { @@ -202,7 +202,7 @@ nlm4_encode_testres(u32 *p, struct nlm_res *resp) /* Encode owner handle. */ if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) - return 0; + return NULL; start = loff_t_to_s64(fl->fl_start); if (fl->fl_end == OFFSET_MAX) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6060f32d751d0e..2eb124475a23a5 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -387,7 +387,7 @@ retry: fattr->valid = 0; if (sattr->ia_valid & ATTR_SIZE) - nfs4_copy_stateid(&arg.stateid, state, 0); + nfs4_copy_stateid(&arg.stateid, state, NULL); else memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid)); diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 5ce9d7d516100b..83ccc66266fe26 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -695,28 +695,29 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st char * arg = NULL; char * pos; opt_desc_t opts[] = { - {"tails", 't', tails, 0, 0}, /* Compatibility stuff, so that -o notail for old setups still work */ - {"notail", 0, 0, 0, (1<<REISERFS_LARGETAIL)|(1<<REISERFS_SMALLTAIL)}, - {"conv", 0, 0, 1<<REISERFS_CONVERT, 0}, - {"attrs", 0, 0, 1<<REISERFS_ATTRS, 0}, - {"noattrs", 0, 0, 0, 1<<REISERFS_ATTRS}, - {"user_xattr", 0, 0, 1<<REISERFS_XATTRS_USER, 0}, - {"nouser_xattr", 0, 0, 0, 1<<REISERFS_XATTRS_USER}, + /* Compatibility stuff, so that -o notail for old setups still work */ + {"tails", .arg_required = 't', .values = tails}, + {"notail", .clrmask = (1<<REISERFS_LARGETAIL)|(1<<REISERFS_SMALLTAIL)}, + {"conv", .setmask = 1<<REISERFS_CONVERT}, + {"attrs", .setmask = 1<<REISERFS_ATTRS}, + {"noattrs", .clrmask = 1<<REISERFS_ATTRS}, + {"user_xattr", .setmask = 1<<REISERFS_XATTRS_USER}, + {"nouser_xattr",.clrmask = 1<<REISERFS_XATTRS_USER}, #ifdef CONFIG_REISERFS_FS_POSIX_ACL - {"acl", 0, 0, 1<<REISERFS_POSIXACL, 0}, - {"noacl", 0, 0, 0, 1<<REISERFS_POSIXACL}, + {"acl", .setmask = 1<<REISERFS_POSIXACL}, + {"noacl", .clrmask = 1<<REISERFS_POSIXACL}, #endif - {"nolog", 0, 0, 0, 0}, /* This is unsupported */ - {"replayonly", 0, 0, 1<<REPLAYONLY, 0}, - {"block-allocator", 'a', balloc, 0, 0}, - {"data", 'd', logging_mode, 0, 0}, - {"resize", 'r', 0, 0, 0}, - {"jdev", 'j', 0, 0, 0}, - {"nolargeio", 'w', 0, 0, 0}, - {"commit", 'c', 0, 0, 0}, - {"usrquota", 0, 0, 0, 0}, - {"grpquota", 0, 0, 0, 0}, - {NULL, 0, 0, 0, 0} + {"nolog",}, /* This is unsupported */ + {"replayonly", .setmask = 1<<REPLAYONLY}, + {"block-allocator", .arg_required = 'a', .values = balloc}, + {"data", .arg_required = 'd', .values = logging_mode}, + {"resize", .arg_required = 'r', .values = NULL}, + {"jdev", .arg_required = 'j', .values = NULL}, + {"nolargeio", .arg_required = 'w', .values = NULL}, + {"commit", .arg_required = 'c', .values = NULL}, + {"usrquota",}, + {"grpquota",}, + {NULL,} }; *blocks = 0; |