From: David Miller Date: Fri, 25 Jul 2008 06:38:31 +0000 (-0700) Subject: endian: Always evaluate arguments. X-Git-Tag: v2.6.27-rc1~501 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d6f4a20cc287a8980c6186624834cf10a70752b;p=pandora-kernel.git endian: Always evaluate arguments. Changeset 7fa897b91a3ea0f16c2873b869d7a0eef05acff4 ("ide: trivial sparse annotations") created an IDE bootup regression on big-endian systems. In drivers/ide/ide-iops.c, function ide_fixstring() we now have the loop: for (p = end ; p != s;) be16_to_cpus((u16 *)(p -= 2)); which will never terminate on big-endian because in such a configuration be16_to_cpus() evaluates to "do { } while (0)" Therefore, always evaluate the arguments to nop endian transformation operations. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed