Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ntfs: le*_add_cpu conversion

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>

authored by

Marcin Slusarz and committed by
Linus Torvalds
80bfc25f f7232154

+2 -3
+2 -3
fs/ntfs/upcase.c
··· 77 77 uc[i] = cpu_to_le16(i); 78 78 for (r = 0; uc_run_table[r][0]; r++) 79 79 for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) 80 - uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) + 81 - uc_run_table[r][2]); 80 + le16_add_cpu(&uc[i], uc_run_table[r][2]); 82 81 for (r = 0; uc_dup_table[r][0]; r++) 83 82 for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) 84 - uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1); 83 + le16_add_cpu(&uc[i + 1], -1); 85 84 for (r = 0; uc_word_table[r][0]; r++) 86 85 uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]); 87 86 return uc;