[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5nxqlvyiy5t4ib6hwlo5h5hwlozw5ie7nzkq2vgwxbf6aqtod5@tbowjxmex26v>
Date: Sat, 4 Jan 2025 00:32:39 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Atharva Tiwari <evepolonium@...il.com>
Cc: kernel test robot <lkp@...el.com>, Jean Delvare <jdelvare@...e.com>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: amd756: Fix endianness handling for word data
Hi again,
> @@ -211,7 +212,7 @@ static s32 amd756_access(struct i2c_adapter * adap, u16 addr,
> SMB_HOST_ADDRESS);
> outb_p(command, SMB_HOST_COMMAND);
> if (read_write == I2C_SMBUS_WRITE)
> - outw_p(data->word, SMB_HOST_DATA); /* TODO: endian???? */
> + outw_p(cpu_to_le16((u16)data->word), SMB_HOST_DATA);
> size = AMD756_WORD_DATA;
> break;
> case I2C_SMBUS_BLOCK_DATA:
> @@ -256,7 +257,7 @@ static s32 amd756_access(struct i2c_adapter * adap, u16 addr,
> data->byte = inw_p(SMB_HOST_DATA);
> break;
> case AMD756_WORD_DATA:
> - data->word = inw_p(SMB_HOST_DATA); /* TODO: endian???? */
> + data->word = (u16)le16_to_cpu(inw_p(SMB_HOST_DATA));
sorry, please do send a new version, the cast should not be
needed here.
If you have any questions, feel free to ask, after having read
Documentation/process/coding-style.rst.
Thanks,
Andi
> break;
> case AMD756_BLOCK_DATA:
> data->block[0] = inw_p(SMB_HOST_DATA) & 0x3f;
> --
> 2.39.5
>
Powered by blists - more mailing lists