ntfs: use get/put_endian helpers
Subsystems (2)
PATCH 29/37 ntfs: use get/put_endian helpers
Signed-off-by Harvey Harrison <[email protected]>
--- fs/ntfs/collate.c | 4 ++-- fs/ntfs/compress.c | 8 ++++---- fs/ntfs/mst.c | 2 +- fs/ntfs/super.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
fs/ntfs/collate.c +2 -2
@@ -52,8 +52,8 @@ static int ntfs_collate_ntofs_ulong(ntfs_volume *vol,// FIXME: We don't really want to bug here. BUG_ON (data1_len != data2_len);BUG_ON (data1_len !=4 ); - d1 =le32_to_cpup (data1); - d2 =le32_to_cpup (data2); + d1 =get_le32 (data1); + d2 =get_le32 (data2);if (d1 < d2) rc =-1 ;else {
fs/ntfs/compress.c +4 -4
@@ -211,7 +211,7 @@ do_next_sb:* position in the compression block is one byte before its end so the * first two checks do not detect it. */ -if (cb == cb_end || !le16_to_cpup ((le16 *)cb) || +if (cb == cb_end || !get_le16 ((le16 *)cb) || (*dest_index == dest_max_index && *dest_ofs == dest_max_ofs)) {int i;
@@ -261,7 +261,7 @@ return_error:/* Setup the current sub-block source pointers and validate range. */ cb_sb_start = cb; - cb_sb_end = cb_sb_start + (le16_to_cpup ((le16 *)cb) &NTFS_SB_SIZE_MASK ) + cb_sb_end = cb_sb_start + (get_le16 ((le16 *)cb) &NTFS_SB_SIZE_MASK ) +3 ;if (cb_sb_end > cb_end) goto return_overflow;
@@ -283,7 +283,7 @@ return_error: dp_addr = (u8 *)page_address (dp) + do_sb_start;/* Now, we are ready to process the current sub-block (sb). */ -if (!(le16_to_cpup ((le16 *)cb) &NTFS_SB_IS_COMPRESSED )) { +if (!(get_le16 ((le16 *)cb) &NTFS_SB_IS_COMPRESSED )) {ntfs_debug ("Found uncompressed sub-block." );/* This sb is not compressed, just copy it into destination. */
@@ -388,7 +388,7 @@ do_next_tag: lg++;/* Get the phrase token into i. */ - pt =le16_to_cpup ((le16 *)cb); + pt =get_le16 ((le16 *)cb);/* * Calculate starting position of the byte sequence in
fs/ntfs/mst.c +1 -1
@@ -146,7 +146,7 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)* Cyclically increment the update sequence number * (skipping 0 and -1, i.e. 0xffff). */ - usn =le16_to_cpup (usa_pos) +1 ; + usn =get_le16 (usa_pos) +1 ;if (usn ==0xffff || !usn) usn =1 ; le_usn =cpu_to_le16 (usn);
fs/ntfs/super.c +1 -1
@@ -566,7 +566,7 @@ static bool is_boot_sector_ntfs(const struct super_block *sb,u32 i;for (i =0 , u = (le32 *)b; u < (le32 *)(&b->checksum); ++u) - i +=le32_to_cpup (u); + i +=get_le32 (u);if (le32_to_cpu (b->checksum) != i)ntfs_warning (sb,"Invalid boot sector checksum." ); }
Signature · 1 line
1.5.6.rc0.277.g804cf