]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ocfs2: convert byte order of constant instead of variable
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Tue, 25 Dec 2007 14:52:59 +0000 (15:52 +0100)
committerMark Fasheh <mark.fasheh@oracle.com>
Fri, 25 Jan 2008 23:05:46 +0000 (15:05 -0800)
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>
fs/ocfs2/endian.h
fs/ocfs2/inode.c

index ff257628af16c24f71bc6782d972ed09d93db6de..1942e09f6ee588fc153ce696cb14d76a7a6c39d1 100644 (file)
@@ -37,11 +37,6 @@ static inline void le64_add_cpu(__le64 *var, u64 val)
        *var = cpu_to_le64(le64_to_cpu(*var) + val);
 }
 
-static inline void le32_and_cpu(__le32 *var, u32 val)
-{
-       *var = cpu_to_le32(le32_to_cpu(*var) & val);
-}
-
 static inline void be32_add_cpu(__be32 *var, u32 val)
 {
        *var = cpu_to_be32(be32_to_cpu(*var) + val);
index 5e19c119183d0a674b7e21d7ad4a7907a79cecc7..7e9e4c79aec7bf4b3e4488190f47972821a3945f 100644 (file)
@@ -620,7 +620,7 @@ static int ocfs2_remove_inode(struct inode *inode,
        }
 
        di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec);
-       le32_and_cpu(&di->i_flags, ~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
+       di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
 
        status = ocfs2_journal_dirty(handle, di_bh);
        if (status < 0) {