Commit 4092d49f705aa19750c39758fa1be767e162c48d

Authored by Marcin Slusarz
Committed by Mark Fasheh
1 parent 17104683d2

ocfs2: convert byte order of constant instead of variable

Convert byte order of constant instead of variable it will be done at
compile time vs run time. Remove unused le32_and_cpu.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>

Showing 2 changed files with 1 additions and 6 deletions Side-by-side Diff

... ... @@ -37,11 +37,6 @@
37 37 *var = cpu_to_le64(le64_to_cpu(*var) + val);
38 38 }
39 39  
40   -static inline void le32_and_cpu(__le32 *var, u32 val)
41   -{
42   - *var = cpu_to_le32(le32_to_cpu(*var) & val);
43   -}
44   -
45 40 static inline void be32_add_cpu(__be32 *var, u32 val)
46 41 {
47 42 *var = cpu_to_be32(be32_to_cpu(*var) + val);
... ... @@ -620,7 +620,7 @@
620 620 }
621 621  
622 622 di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec);
623   - le32_and_cpu(&di->i_flags, ~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
  623 + di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
624 624  
625 625 status = ocfs2_journal_dirty(handle, di_bh);
626 626 if (status < 0) {