aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/ialloc.c
diff options
context:
space:
mode:
authormarcin.slusarz@gmail.com <marcin.slusarz@gmail.com>2008-01-30 16:03:57 -0500
committerJan Kara <jack@suse.cz>2008-04-17 08:22:28 -0400
commitc2104fda5e6a6981e385b2d11c5c591ab06d82a2 (patch)
tree58d450dc7dfc8086391e5b9895847f6dfa8f05a2 /fs/udf/ialloc.c
parent456390de465e5a19c84bca5d78e2550971ab5a96 (diff)
udf: replace all adds to little endians variables with le*_add_cpu
replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); sparse didn't generate any new warning with this patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/ialloc.c')
-rw-r--r--fs/udf/ialloc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index c3fb28eee64..eb9cfa23dc3 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -46,11 +46,9 @@ void udf_free_inode(struct inode *inode)
46 struct logicalVolIntegrityDescImpUse *lvidiu = 46 struct logicalVolIntegrityDescImpUse *lvidiu =
47 udf_sb_lvidiu(sbi); 47 udf_sb_lvidiu(sbi);
48 if (S_ISDIR(inode->i_mode)) 48 if (S_ISDIR(inode->i_mode))
49 lvidiu->numDirs = 49 le32_add_cpu(&lvidiu->numDirs, -1);
50 cpu_to_le32(le32_to_cpu(lvidiu->numDirs) - 1);
51 else 50 else
52 lvidiu->numFiles = 51 le32_add_cpu(&lvidiu->numFiles, -1);
53 cpu_to_le32(le32_to_cpu(lvidiu->numFiles) - 1);
54 52
55 mark_buffer_dirty(sbi->s_lvid_bh); 53 mark_buffer_dirty(sbi->s_lvid_bh);
56 } 54 }
@@ -104,11 +102,9 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
104 lvhd = (struct logicalVolHeaderDesc *) 102 lvhd = (struct logicalVolHeaderDesc *)
105 (lvid->logicalVolContentsUse); 103 (lvid->logicalVolContentsUse);
106 if (S_ISDIR(mode)) 104 if (S_ISDIR(mode))
107 lvidiu->numDirs = 105 le32_add_cpu(&lvidiu->numDirs, 1);
108 cpu_to_le32(le32_to_cpu(lvidiu->numDirs) + 1);
109 else 106 else
110 lvidiu->numFiles = 107 le32_add_cpu(&lvidiu->numFiles, 1);
111 cpu_to_le32(le32_to_cpu(lvidiu->numFiles) + 1);
112 iinfo->i_unique = uniqueID = le64_to_cpu(lvhd->uniqueID); 108 iinfo->i_unique = uniqueID = le64_to_cpu(lvhd->uniqueID);
113 if (!(++uniqueID & 0x00000000FFFFFFFFUL)) 109 if (!(++uniqueID & 0x00000000FFFFFFFFUL))
114 uniqueID += 16; 110 uniqueID += 16;