aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/prints.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-03-24 06:15:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:19 -0500
commite8c96f8c29d89af0c13dc2819a9a00575846ca18 (patch)
treeb90ed0da4803df56a91be5979580e335af2d697c /fs/reiserfs/prints.c
parentb5029622ac86bb441dc5e641226fb1152fca02d7 (diff)
[PATCH] fs: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Cc: David Howells <dhowells@redhat.com> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Chris Mason <mason@suse.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Nathan Scott <nathans@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/prints.c')
-rw-r--r--fs/reiserfs/prints.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index d55e164bd5c2..78b40621b88b 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -601,8 +601,7 @@ void store_print_tb(struct tree_balance *tb)
601 tb->tb_mode, PATH_LAST_POSITION(tb->tb_path), 601 tb->tb_mode, PATH_LAST_POSITION(tb->tb_path),
602 tb->tb_path->pos_in_item); 602 tb->tb_path->pos_in_item);
603 603
604 for (h = 0; h < sizeof(tb->insert_size) / sizeof(tb->insert_size[0]); 604 for (h = 0; h < ARRAY_SIZE(tb->insert_size); h++) {
605 h++) {
606 if (PATH_H_PATH_OFFSET(tb->tb_path, h) <= 605 if (PATH_H_PATH_OFFSET(tb->tb_path, h) <=
607 tb->tb_path->path_length 606 tb->tb_path->path_length
608 && PATH_H_PATH_OFFSET(tb->tb_path, 607 && PATH_H_PATH_OFFSET(tb->tb_path,
@@ -658,15 +657,13 @@ void store_print_tb(struct tree_balance *tb)
658 657
659 /* print FEB list (list of buffers in form (bh (b_blocknr, b_count), that will be used for new nodes) */ 658 /* print FEB list (list of buffers in form (bh (b_blocknr, b_count), that will be used for new nodes) */
660 h = 0; 659 h = 0;
661 for (i = 0; i < sizeof(tb->FEB) / sizeof(tb->FEB[0]); i++) 660 for (i = 0; i < ARRAY_SIZE(tb->FEB); i++)
662 sprintf(print_tb_buf + strlen(print_tb_buf), 661 sprintf(print_tb_buf + strlen(print_tb_buf),
663 "%p (%llu %d)%s", tb->FEB[i], 662 "%p (%llu %d)%s", tb->FEB[i],
664 tb->FEB[i] ? (unsigned long long)tb->FEB[i]-> 663 tb->FEB[i] ? (unsigned long long)tb->FEB[i]->
665 b_blocknr : 0ULL, 664 b_blocknr : 0ULL,
666 tb->FEB[i] ? atomic_read(&(tb->FEB[i]->b_count)) : 0, 665 tb->FEB[i] ? atomic_read(&(tb->FEB[i]->b_count)) : 0,
667 (i == 666 (i == ARRAY_SIZE(tb->FEB) - 1) ? "\n" : ", ");
668 sizeof(tb->FEB) / sizeof(tb->FEB[0]) -
669 1) ? "\n" : ", ");
670 667
671 sprintf(print_tb_buf + strlen(print_tb_buf), 668 sprintf(print_tb_buf + strlen(print_tb_buf),
672 "======================== the end ====================================\n"); 669 "======================== the end ====================================\n");