diff options
author | marcin.slusarz@gmail.com <marcin.slusarz@gmail.com> | 2008-01-30 16:03:57 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2008-04-17 08:22:28 -0400 |
commit | c2104fda5e6a6981e385b2d11c5c591ab06d82a2 (patch) | |
tree | 58d450dc7dfc8086391e5b9895847f6dfa8f05a2 /fs/udf/inode.c | |
parent | 456390de465e5a19c84bca5d78e2550971ab5a96 (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/inode.c')
-rw-r--r-- | fs/udf/inode.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index dc2f946dfca9..91d1f1d3d7a5 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1748,9 +1748,7 @@ int8_t udf_add_aext(struct inode *inode, struct extent_position *epos, | |||
1748 | 1748 | ||
1749 | if (epos->bh) { | 1749 | if (epos->bh) { |
1750 | aed = (struct allocExtDesc *)epos->bh->b_data; | 1750 | aed = (struct allocExtDesc *)epos->bh->b_data; |
1751 | aed->lengthAllocDescs = | 1751 | le32_add_cpu(&aed->lengthAllocDescs, adsize); |
1752 | cpu_to_le32(le32_to_cpu( | ||
1753 | aed->lengthAllocDescs) + adsize); | ||
1754 | } else { | 1752 | } else { |
1755 | iinfo->i_lenAlloc += adsize; | 1753 | iinfo->i_lenAlloc += adsize; |
1756 | mark_inode_dirty(inode); | 1754 | mark_inode_dirty(inode); |
@@ -1800,9 +1798,7 @@ int8_t udf_add_aext(struct inode *inode, struct extent_position *epos, | |||
1800 | mark_inode_dirty(inode); | 1798 | mark_inode_dirty(inode); |
1801 | } else { | 1799 | } else { |
1802 | aed = (struct allocExtDesc *)epos->bh->b_data; | 1800 | aed = (struct allocExtDesc *)epos->bh->b_data; |
1803 | aed->lengthAllocDescs = | 1801 | le32_add_cpu(&aed->lengthAllocDescs, adsize); |
1804 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) + | ||
1805 | adsize); | ||
1806 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 1802 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
1807 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 1803 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
1808 | udf_update_tag(epos->bh->b_data, | 1804 | udf_update_tag(epos->bh->b_data, |
@@ -2016,9 +2012,7 @@ int8_t udf_delete_aext(struct inode *inode, struct extent_position epos, | |||
2016 | mark_inode_dirty(inode); | 2012 | mark_inode_dirty(inode); |
2017 | } else { | 2013 | } else { |
2018 | aed = (struct allocExtDesc *)oepos.bh->b_data; | 2014 | aed = (struct allocExtDesc *)oepos.bh->b_data; |
2019 | aed->lengthAllocDescs = | 2015 | le32_add_cpu(&aed->lengthAllocDescs, -(2 * adsize)); |
2020 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) - | ||
2021 | (2 * adsize)); | ||
2022 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 2016 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
2023 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 2017 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
2024 | udf_update_tag(oepos.bh->b_data, | 2018 | udf_update_tag(oepos.bh->b_data, |
@@ -2035,9 +2029,7 @@ int8_t udf_delete_aext(struct inode *inode, struct extent_position epos, | |||
2035 | mark_inode_dirty(inode); | 2029 | mark_inode_dirty(inode); |
2036 | } else { | 2030 | } else { |
2037 | aed = (struct allocExtDesc *)oepos.bh->b_data; | 2031 | aed = (struct allocExtDesc *)oepos.bh->b_data; |
2038 | aed->lengthAllocDescs = | 2032 | le32_add_cpu(&aed->lengthAllocDescs, -adsize); |
2039 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) - | ||
2040 | adsize); | ||
2041 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 2033 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
2042 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 2034 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
2043 | udf_update_tag(oepos.bh->b_data, | 2035 | udf_update_tag(oepos.bh->b_data, |