ntfs: le*_add_cpu conversion
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Fri, 23 May 2008 20:04:22 +0000 (13:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 May 2008 16:56:08 +0000 (09:56 -0700)
replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
expression_in_cpu_byteorder);
with:
leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ntfs/upcase.c

index 9101807dc81af59491336f5cebd88efe67c0d867..e2f72ca98037a44755f7837d9b59823f96914eb3 100644 (file)
@@ -77,11 +77,10 @@ ntfschar *generate_default_upcase(void)
                uc[i] = cpu_to_le16(i);
        for (r = 0; uc_run_table[r][0]; r++)
                for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++)
-                       uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) +
-                                       uc_run_table[r][2]);
+                       le16_add_cpu(&uc[i], uc_run_table[r][2]);
        for (r = 0; uc_dup_table[r][0]; r++)
                for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2)
-                       uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1);
+                       le16_add_cpu(&uc[i + 1], -1);
        for (r = 0; uc_word_table[r][0]; r++)
                uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]);
        return uc;