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

i2c-pmcmsp: Fix endianness misannotation

tmp is used as host-endian and is loaded from a be64, fix the cast and the
endian accessor used.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Harvey Harrison and committed by
Jean Delvare
d9d38ca0 6c34bc29

+1 -1
+1 -1
drivers/i2c/busses/i2c-pmcmsp.c
··· 486 486 487 487 if (cmd->type == MSP_TWI_CMD_WRITE || 488 488 cmd->type == MSP_TWI_CMD_WRITE_READ) { 489 - __be64 tmp = cpu_to_be64p((u64 *)cmd->write_data); 489 + u64 tmp = be64_to_cpup((__be64 *)cmd->write_data); 490 490 tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8; 491 491 dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp); 492 492 pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,