Re: [PATCH 3/4] i2c: xiic: Correct the datatype for rx_watermark

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

 



On Thu, Apr 21, 2022 at 10:50:32AM +0200, Michal Simek wrote:
> 
> 
> On 4/20/22 09:59, Shubhrajyoti Datta wrote:
> > The message length data type should be u16 as per the i2c_msg structure
> > 
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxxxxx>
> > ---
> >   drivers/i2c/busses/i2c-xiic.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> > index 16a7e3164e68..eb4d34e7c0fe 100644
> > --- a/drivers/i2c/busses/i2c-xiic.c
> > +++ b/drivers/i2c/busses/i2c-xiic.c
> > @@ -576,7 +576,7 @@ static int xiic_busy(struct xiic_i2c *i2c)
> >   static void xiic_start_recv(struct xiic_i2c *i2c)
> >   {
> > -	u8 rx_watermark;
> > +	u16 rx_watermark;
> >   	struct i2c_msg *msg = i2c->rx_msg = i2c->tx_msg;
> >   	/* Clear and enable Rx full interrupt. */
> 
> xiic_setreg8(struct xiic_i2c *i2c, int reg, u8 value) has u8 value it means
> I would expect you will also recast it.
> Value can't be more then IIC_RX_FIFO_DEPTH anyway that's why it shouldn't be
> a problem.
> 
> xiic_setreg8(i2c, XIIC_RFD_REG_OFFSET, (u8)(rx_watermark - 1));

Waiting for v2 here.

Attachment: signature.asc
Description: PGP signature


[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