hfs/hfsplus: be*_add_cpu conversion
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Wed, 30 Apr 2008 07:54:47 +0000 (00:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:51 +0000 (08:29 -0700)
replace all:
big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) +
expression_in_cpu_byteorder);
with:
beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hfs/mdb.c
fs/hfsplus/super.c

index b4651e128d7fbb8e25a3b1767ef1f967ea08b6f0..36ca2e1a4fa32b82f937fa415f77a92addfdd022 100644 (file)
@@ -215,7 +215,7 @@ int hfs_mdb_get(struct super_block *sb)
                attrib &= cpu_to_be16(~HFS_SB_ATTRIB_UNMNT);
                attrib |= cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT);
                mdb->drAtrb = attrib;
-               mdb->drWrCnt = cpu_to_be32(be32_to_cpu(mdb->drWrCnt) + 1);
+               be32_add_cpu(&mdb->drWrCnt, 1);
                mdb->drLsMod = hfs_mtime();
 
                mark_buffer_dirty(HFS_SB(sb)->mdb_bh);
index 946466cd9f25853f32158760ec4f5db8f9c77ae0..ce97a54518d81d8b904c7a01c336133516547eb3 100644 (file)
@@ -423,7 +423,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
         */
        vhdr->last_mount_vers = cpu_to_be32(HFSP_MOUNT_VERSION);
        vhdr->modify_date = hfsp_now2mt();
-       vhdr->write_count = cpu_to_be32(be32_to_cpu(vhdr->write_count) + 1);
+       be32_add_cpu(&vhdr->write_count, 1);
        vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT);
        vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT);
        mark_buffer_dirty(HFSPLUS_SB(sb).s_vhbh);