From: Jack Morgenstein Date: Thu, 7 Mar 2013 03:46:54 +0000 (+0000) Subject: net/mlx4_core: Fix endianness bug in set_param_l X-Git-Tag: v3.9-rc3~36^2~24^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7dbeba85600aa2c8daf99f8f53d9ad27e88b810;p=pandora-kernel.git net/mlx4_core: Fix endianness bug in set_param_l The set_param_l function assumes casting a u64 pointer to a u32 pointer allows to access the lower 32bits, but it results in writing the upper 32 bits on big endian systems. The fixed function reads the upper 32 bits of the 64 argument, and or's them with the 32 bits of the 32-bit value passed to the function. Since this is now a "read-modify-write" operation, we got many "unintialized variable" warnings which needed to be fixed as well. Reported-by: Alexander Schmidt . Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- Reading git-diff-tree failed