summaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_dtree.h
diff options
context:
space:
mode:
authorShaun Zinck <shaun.zinck@gmail.com>2007-08-31 12:57:28 -0500
committerDave Kleikamp <shaggy@linux.vnet.ibm.com>2008-01-03 13:11:59 -0600
commita7fe0ba7eee4f7c53077ff2bed2b581db17d00df (patch)
treedeb781f85fb5adfd7b4370de8563331b9026bc58 /fs/jfs/jfs_dtree.h
parent1eb3a711d6a1c8a4697a2e89d09048353b8aefd3 (diff)
downloadlinux-a7fe0ba7eee4f7c53077ff2bed2b581db17d00df.tar.bz2
JFS: use DIV_ROUND_UP where appropriate
This replaces some macros and code, which do the same thing as DIV_ROUND_UP defined in kernel.h, to use the DIV_ROUND_UP macro. Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Diffstat (limited to 'fs/jfs/jfs_dtree.h')
-rw-r--r--fs/jfs/jfs_dtree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jfs/jfs_dtree.h b/fs/jfs/jfs_dtree.h
index 8561c6ecece0..cdac2d5bafeb 100644
--- a/fs/jfs/jfs_dtree.h
+++ b/fs/jfs/jfs_dtree.h
@@ -74,7 +74,7 @@ struct idtentry {
#define DTIHDRDATALEN 11
/* compute number of slots for entry */
-#define NDTINTERNAL(klen) ( ((4 + (klen)) + (15 - 1)) / 15 )
+#define NDTINTERNAL(klen) (DIV_ROUND_UP((4 + (klen)), 15))
/*
@@ -133,7 +133,7 @@ struct dir_table_slot {
( ((s64)((dts)->addr1)) << 32 | __le32_to_cpu((dts)->addr2) )
/* compute number of slots for entry */
-#define NDTLEAF_LEGACY(klen) ( ((2 + (klen)) + (15 - 1)) / 15 )
+#define NDTLEAF_LEGACY(klen) (DIV_ROUND_UP((2 + (klen)), 15))
#define NDTLEAF NDTINTERNAL