From: Marcin Slusarz <marcin.slusarz@gmail.com> Hi This patchset converts big/little_endian_variable = cpu_to_[bl]eX([bl]eX_to_cpu(big/little_endian_variable) + expression_in_cpu_byteorder); to: [bl]eX_add_cpu(&big/little_endian_variable, expression_in_cpu_byteorder); All patches were generated by spatch, then reviewed and fixed to follow coding style. Semantic patch: @@ expression *X; expression Y; @@ ( - *X = cpu_to_le64(le64_to_cpu(*X) + Y); + le64_add_cpu(X, Y); | - *X = cpu_to_le32(le32_to_cpu(*X) + Y); + le32_add_cpu(X, Y); | - *X = cpu_to_le16(le16_to_cpu(*X) + Y); + le16_add_cpu(X, Y); | - *X = cpu_to_be64(be64_to_cpu(*X) + Y); + be64_add_cpu(X, Y); | - *X = cpu_to_be32(be32_to_cpu(*X) + Y); + be32_add_cpu(X, Y); | - *X = cpu_to_be16(be16_to_cpu(*X) + Y); + be16_add_cpu(X, Y); | - *X = cpu_to_le64(le64_to_cpu(*X) - Y); + le64_add_cpu(X, -Y); | - *X = cpu_to_le32(le32_to_cpu(*X) - Y); + le32_add_cpu(X, -Y); | - *X = cpu_to_le16(le16_to_cpu(*X) - Y); + le16_add_cpu(X, -Y); | - *X = cpu_to_be64(be64_to_cpu(*X) - Y); + be64_add_cpu(X, -Y); | - *X = cpu_to_be32(be32_to_cpu(*X) - Y); + be32_add_cpu(X, -Y); | - *X = cpu_to_be16(be16_to_cpu(*X) - Y); + be16_add_cpu(X, -Y); ) @@ expression X, Y; @@ ( - X = cpu_to_le64(le64_to_cpu(X) + Y); + le64_add_cpu(&X, Y); | - X = cpu_to_le32(le32_to_cpu(X) + Y); + le32_add_cpu(&X, Y); | - X = cpu_to_le16(le16_to_cpu(X) + Y); + le16_add_cpu(&X, Y); | - X = cpu_to_be64(be64_to_cpu(X) + Y); + be64_add_cpu(&X, Y); | - X = cpu_to_be32(be32_to_cpu(X) + Y); + be32_add_cpu(&X, Y); | - X = cpu_to_be16(be16_to_cpu(X) + Y); + be16_add_cpu(&X, Y); | - X = cpu_to_le64(le64_to_cpu(X) - Y); + le64_add_cpu(&X, -Y); | - X = cpu_to_le32(le32_to_cpu(X) - Y); + le32_add_cpu(&X, -Y); | - X = cpu_to_le16(le16_to_cpu(X) - Y); + le16_add_cpu(&X, -Y); | - X = cpu_to_be64(be64_to_cpu(X) - Y); + be64_add_cpu(&X, -Y); | - X = cpu_to_be32(be32_to_cpu(X) - Y); + be32_add_cpu(&X, -Y); | - X = cpu_to_be16(be16_to_cpu(X) - Y); + be16_add_cpu(&X, -Y); ) diffstat: crypto/lrw.c | 2 +- drivers/ieee1394/csr.c | 6 ++---- drivers/infiniband/hw/mthca/mthca_cq.c | 2 +- drivers/net/wireless/ipw2200.c | 4 +--- drivers/scsi/aacraid/commsup.c | 2 +- drivers/scsi/ips.c | 8 ++------ fs/affs/file.c | 4 ++-- fs/ext2/ialloc.c | 12 ++++-------- fs/ext2/super.c | 2 +- fs/ext2/xattr.c | 9 +++------ fs/ext4/balloc.c | 7 ++----- fs/ext4/extents.c | 20 +++++++++----------- fs/ext4/ialloc.c | 12 ++++-------- fs/ext4/mballoc.c | 7 ++----- fs/ext4/resize.c | 6 ++---- fs/ext4/super.c | 2 +- fs/ext4/xattr.c | 6 ++---- fs/gfs2/dir.c | 6 +++--- fs/hfs/mdb.c | 2 +- fs/hfsplus/super.c | 2 +- fs/jfs/jfs_dmap.c | 11 +++++------ fs/jfs/jfs_imap.c | 15 ++++++--------- fs/jfs/jfs_xtree.c | 26 ++++++++------------------ fs/ntfs/upcase.c | 5 ++--- fs/ocfs2/dir.c | 5 ++--- fs/ocfs2/localalloc.c | 3 +-- fs/quota_v2.c | 4 ++-- fs/reiserfs/objectid.c | 5 ++--- fs/reiserfs/stree.c | 3 +-- fs/sysv/sysv.h | 8 ++++---- fs/ufs/swab.h | 16 ++++++++-------- 31 files changed, 86 insertions(+), 136 deletions(-) Marcin --
| Martin Michlmayr | Network slowdown due to CFS |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Ingo Molnar | [git pull] x86 arch updates for v2.6.25 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Alexander Gladysh | [Q] Encrypted GIT? |
| Andreas Ericsson | Re: About git and the use of SHA-1 |
| Gerrit Pape | [PATCH/rfc] git-svn.perl: workaround assertions in svn library 1.5.0 |
| Matthieu Moy | git push to a non-bare repository |
| Christian Weisgerber | Re: libiconv problem |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Ben Hutchings | Re: [GIT]: Networking |
| Joerg Roedel | [PATCH 06/10] x86: add check code for map/unmap_sg code |
