Re: [PATCH] i2c: amd756: Fix endianness handling for word data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux