[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35hlmjlgq4xqnydipaprtcrb2ubwdcvo7qx3tfxtoqlwlamowz@lhrw7dnhme6d>
Date: Sat, 4 Jan 2025 04:46:55 +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
On Sat, Jan 04, 2025 at 12:32:39AM +0100, Andi Shyti wrote:
> 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.
Sorry, I managed to make myself misunderstood in my previous
emails. Please don't send anything, I've already pushed the
version with the fix reported by LKP.
Andi
Powered by blists - more mailing lists