public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	<linux-i2c@vger.kernel.org>
Cc: <michal.simek@xilinx.com>, <git@xilinx.com>
Subject: Re: [PATCH 3/4] i2c: xiic: Correct the datatype for rx_watermark
Date: Thu, 21 Apr 2022 10:50:32 +0200	[thread overview]
Message-ID: <29058bda-e040-2b69-7dd1-33e52ba431c5@xilinx.com> (raw)
In-Reply-To: <20220420075924.14546-4-shubhrajyoti.datta@xilinx.com>



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@xilinx.com>
> ---
>   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));

Thanks,
Michal

  reply	other threads:[~2022-04-21  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  7:59 [PATCH 0/4] i2c: xiic: misc fixes Shubhrajyoti Datta
2022-04-20  7:59 ` [PATCH 1/4] i2c-xiic: return value of xiic_reinit Shubhrajyoti Datta
2022-04-21  8:46   ` Michal Simek
2022-05-14 14:03   ` Wolfram Sang
2022-04-20  7:59 ` [PATCH 2/4] i2c: xiic: Fix coding style issues Shubhrajyoti Datta
2022-05-14 14:03   ` Wolfram Sang
2022-04-20  7:59 ` [PATCH 3/4] i2c: xiic: Correct the datatype for rx_watermark Shubhrajyoti Datta
2022-04-21  8:50   ` Michal Simek [this message]
2022-05-14 14:04     ` Wolfram Sang
2022-04-20  7:59 ` [PATCH 4/4] i2c: xiic: Fix Tx Interrupt path for grouped messages Shubhrajyoti Datta
2022-04-21  8:51   ` Michal Simek
2022-05-14 14:04   ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29058bda-e040-2b69-7dd1-33e52ba431c5@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=git@xilinx.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=shubhrajyoti.datta@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox