diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-28 04:34:26 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-31 07:13:25 -0500 |
commit | f92b982680e4b4149c559789a54e1e9db190752a (patch) | |
tree | fb24f6351be9f307d8f9001f226f8aa0ee71cfdc /fs | |
parent | 6a4a9b438fe43397f4652853838f284cddd629b5 (diff) |
UBIFS: fix checkpatch.pl warnings
These are mostly long lines and wrong indentation warning
fixes. But also there are two volatile variables and
checkpatch.pl complains about them:
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+ volatile int gc_seq;
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
+ volatile int gced_lnum;
Well, we anyway use smp_wmb() for c->gc_seq and c->gced_lnum, so
these 'volatile' modifiers can be just dropped.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/debug.c | 3 | ||||
-rw-r--r-- | fs/ubifs/file.c | 4 | ||||
-rw-r--r-- | fs/ubifs/journal.c | 2 | ||||
-rw-r--r-- | fs/ubifs/lpt_commit.c | 2 | ||||
-rw-r--r-- | fs/ubifs/tnc.c | 31 | ||||
-rw-r--r-- | fs/ubifs/ubifs.h | 8 |
6 files changed, 25 insertions, 25 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index a2be11584ad3..350fedecc833 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -703,7 +703,8 @@ void dbg_dump_lpt_info(struct ubifs_info *c) | |||
703 | printk(KERN_DEBUG "\tLPT root is at %d:%d\n", c->lpt_lnum, c->lpt_offs); | 703 | printk(KERN_DEBUG "\tLPT root is at %d:%d\n", c->lpt_lnum, c->lpt_offs); |
704 | printk(KERN_DEBUG "\tLPT head is at %d:%d\n", | 704 | printk(KERN_DEBUG "\tLPT head is at %d:%d\n", |
705 | c->nhead_lnum, c->nhead_offs); | 705 | c->nhead_lnum, c->nhead_offs); |
706 | printk(KERN_DEBUG "\tLPT ltab is at %d:%d\n", c->ltab_lnum, c->ltab_offs); | 706 | printk(KERN_DEBUG "\tLPT ltab is at %d:%d\n", |
707 | c->ltab_lnum, c->ltab_offs); | ||
707 | if (c->big_lpt) | 708 | if (c->big_lpt) |
708 | printk(KERN_DEBUG "\tLPT lsave is at %d:%d\n", | 709 | printk(KERN_DEBUG "\tLPT lsave is at %d:%d\n", |
709 | c->lsave_lnum, c->lsave_offs); | 710 | c->lsave_lnum, c->lsave_offs); |
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 7f1de98e6091..fe82d2464d46 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -72,8 +72,8 @@ static int read_block(struct inode *inode, void *addr, unsigned int block, | |||
72 | return err; | 72 | return err; |
73 | } | 73 | } |
74 | 74 | ||
75 | ubifs_assert(le64_to_cpu(dn->ch.sqnum) > ubifs_inode(inode)->creat_sqnum); | 75 | ubifs_assert(le64_to_cpu(dn->ch.sqnum) > |
76 | 76 | ubifs_inode(inode)->creat_sqnum); | |
77 | len = le32_to_cpu(dn->size); | 77 | len = le32_to_cpu(dn->size); |
78 | if (len <= 0 || len > UBIFS_BLOCK_SIZE) | 78 | if (len <= 0 || len > UBIFS_BLOCK_SIZE) |
79 | goto dump; | 79 | goto dump; |
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index f91b745908ea..3b0fa704d559 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c | |||
@@ -1220,7 +1220,7 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode, | |||
1220 | data_key_init(c, &key, inum, blk); | 1220 | data_key_init(c, &key, inum, blk); |
1221 | 1221 | ||
1222 | bit = old_size & (UBIFS_BLOCK_SIZE - 1); | 1222 | bit = old_size & (UBIFS_BLOCK_SIZE - 1); |
1223 | blk = (old_size >> UBIFS_BLOCK_SHIFT) - (bit ? 0: 1); | 1223 | blk = (old_size >> UBIFS_BLOCK_SHIFT) - (bit ? 0 : 1); |
1224 | data_key_init(c, &to_key, inum, blk); | 1224 | data_key_init(c, &to_key, inum, blk); |
1225 | 1225 | ||
1226 | err = ubifs_tnc_remove_range(c, &key, &to_key); | 1226 | err = ubifs_tnc_remove_range(c, &key, &to_key); |
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index da60b5a0fab9..b8a060794239 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -548,7 +548,7 @@ static int write_cnodes(struct ubifs_info *c) | |||
548 | no_space: | 548 | no_space: |
549 | ubifs_err("LPT out of space mismatch"); | 549 | ubifs_err("LPT out of space mismatch"); |
550 | dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " | 550 | dbg_err("LPT out of space mismatch at LEB %d:%d needing %d, done_ltab " |
551 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); | 551 | "%d, done_lsave %d", lnum, offs, len, done_ltab, done_lsave); |
552 | dbg_dump_lpt_info(c); | 552 | dbg_dump_lpt_info(c); |
553 | dbg_dump_lpt_lebs(c); | 553 | dbg_dump_lpt_lebs(c); |
554 | dump_stack(); | 554 | dump_stack(); |
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 6eef5344a145..f7e36f545527 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c | |||
@@ -2245,12 +2245,11 @@ int ubifs_tnc_replace(struct ubifs_info *c, const union ubifs_key *key, | |||
2245 | if (found) { | 2245 | if (found) { |
2246 | /* Ensure the znode is dirtied */ | 2246 | /* Ensure the znode is dirtied */ |
2247 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2247 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2248 | znode = dirty_cow_bottom_up(c, | 2248 | znode = dirty_cow_bottom_up(c, znode); |
2249 | znode); | 2249 | if (IS_ERR(znode)) { |
2250 | if (IS_ERR(znode)) { | 2250 | err = PTR_ERR(znode); |
2251 | err = PTR_ERR(znode); | 2251 | goto out_unlock; |
2252 | goto out_unlock; | 2252 | } |
2253 | } | ||
2254 | } | 2253 | } |
2255 | zbr = &znode->zbranch[n]; | 2254 | zbr = &znode->zbranch[n]; |
2256 | lnc_free(zbr); | 2255 | lnc_free(zbr); |
@@ -2317,11 +2316,11 @@ int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key, | |||
2317 | 2316 | ||
2318 | /* Ensure the znode is dirtied */ | 2317 | /* Ensure the znode is dirtied */ |
2319 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2318 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2320 | znode = dirty_cow_bottom_up(c, znode); | 2319 | znode = dirty_cow_bottom_up(c, znode); |
2321 | if (IS_ERR(znode)) { | 2320 | if (IS_ERR(znode)) { |
2322 | err = PTR_ERR(znode); | 2321 | err = PTR_ERR(znode); |
2323 | goto out_unlock; | 2322 | goto out_unlock; |
2324 | } | 2323 | } |
2325 | } | 2324 | } |
2326 | 2325 | ||
2327 | if (found == 1) { | 2326 | if (found == 1) { |
@@ -2627,11 +2626,11 @@ int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key, | |||
2627 | 2626 | ||
2628 | /* Ensure the znode is dirtied */ | 2627 | /* Ensure the znode is dirtied */ |
2629 | if (znode->cnext || !ubifs_zn_dirty(znode)) { | 2628 | if (znode->cnext || !ubifs_zn_dirty(znode)) { |
2630 | znode = dirty_cow_bottom_up(c, znode); | 2629 | znode = dirty_cow_bottom_up(c, znode); |
2631 | if (IS_ERR(znode)) { | 2630 | if (IS_ERR(znode)) { |
2632 | err = PTR_ERR(znode); | 2631 | err = PTR_ERR(znode); |
2633 | goto out_unlock; | 2632 | goto out_unlock; |
2634 | } | 2633 | } |
2635 | } | 2634 | } |
2636 | 2635 | ||
2637 | /* Remove all keys in range except the first */ | 2636 | /* Remove all keys in range except the first */ |
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index a17dd794ae92..3275c89a3585 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -481,8 +481,8 @@ struct ubifs_lprops { | |||
481 | struct ubifs_lpt_lprops { | 481 | struct ubifs_lpt_lprops { |
482 | int free; | 482 | int free; |
483 | int dirty; | 483 | int dirty; |
484 | unsigned tgc : 1; | 484 | unsigned tgc:1; |
485 | unsigned cmt : 1; | 485 | unsigned cmt:1; |
486 | }; | 486 | }; |
487 | 487 | ||
488 | /** | 488 | /** |
@@ -1322,8 +1322,8 @@ struct ubifs_info { | |||
1322 | void *sbuf; | 1322 | void *sbuf; |
1323 | struct list_head idx_gc; | 1323 | struct list_head idx_gc; |
1324 | int idx_gc_cnt; | 1324 | int idx_gc_cnt; |
1325 | volatile int gc_seq; | 1325 | int gc_seq; |
1326 | volatile int gced_lnum; | 1326 | int gced_lnum; |
1327 | 1327 | ||
1328 | struct list_head infos_list; | 1328 | struct list_head infos_list; |
1329 | struct mutex umount_mutex; | 1329 | struct mutex umount_mutex; |