Skip to contentSkip to conversation

i2c: misannotation in i2c-pmcmsp.c

PATCH Jean Delvare 1 participant 1 message Dec 5, 2008 2 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 200812012217.mB1MHccm011065-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org

#2 lore raw
Quoted 16 lines · On Mon, 01 Dec 2008 14:17:38 -0800, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@publi…

From: Harvey Harrison <[email protected]>

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

---

 drivers/i2c/busses/i2c-pmcmsp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/i2c/busses/i2c-pmcmsp.c~i2c-misannotation-in-i2c-pmcmspc drivers/i2c/busses/i2c-pmcmsp.c

drivers/i2c/busses/i2c-pmcmsp.c static enum pmcmsptwi_xfer_result pmcmsp · line 492

Quoted 8 lines
drivers/i2c/busses/i2c-pmcmsp.c renamed from drivers/i2c/busses/i2c-pmcmsp.c~i2c-misannotation-in-i2c-pmcmspc +1 -1
@@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsp
 
 	if (cmd->type == MSP_TWI_CMD_WRITE ||
 	    cmd->type == MSP_TWI_CMD_WRITE_READ) {
-		__be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
+		u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
 		tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
 		dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
 		pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,

Ben, Marc, any comment on this?

Signature · 1 line
Jean Delvare