Skip to content

Commit

Permalink
hfs/hfsplus: be*_add_cpu conversion
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Roman Zippel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mslusarz authored and torvalds committed Apr 30, 2008
1 parent 6369a4a commit 20c79e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/hfs/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 20c79e7

Please sign in to comment.