From: Joel Becker Date: Tue, 16 Dec 2008 01:13:48 +0000 (-0800) Subject: ocfs2: Don't hand-code xor in ocfs2_hamming_encode(). X-Git-Tag: v2.6.29-rc1~505^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e798b3f8a920c82a8e556dd54df97f0d3d0f9144;p=pandora-kernel.git ocfs2: Don't hand-code xor in ocfs2_hamming_encode(). When I wrote ocfs2_hamming_encode(), I was following documentation of the algorithm and didn't have quite the (possibly still imperfect) grasp of it I do now. As part of this, I literally hand-coded xor. I would test a bit, and then add that bit via xor to the parity word. I can, of course, just do a single xor of the parity word and the source word (the code buffer bit offset). This cuts CPU usage by 53% on a mostly populated buffer (an inode containing utmp.h inline). Joel Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh --- Reading git-diff-tree failed