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 v3] i2c-xiic: Fix the type check for xiic_wakeup
Date: Tue, 14 Jun 2022 11:01:42 +0200	[thread overview]
Message-ID: <d5e8d7fb-a89f-123a-cae0-1766996c2e8c@xilinx.com> (raw)
In-Reply-To: <20220614061855.24210-1-shubhrajyoti.datta@xilinx.com>



On 6/14/22 08:18, Shubhrajyoti Datta wrote:
> Fix the coverity warning
> mixed_enum_type: enumerated type mixed with another type
> 
> We are passing an enum in the xiic_wakeup lets change
> the function parameters to reflect that.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
> v2:
> Update the wakeup_code to enum
> v3:
> remove the initialisers
> 
>   drivers/i2c/busses/i2c-xiic.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index 9a1c3f8b7048..b3fe6b2aa3ca 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -367,7 +367,7 @@ static void xiic_fill_tx_fifo(struct xiic_i2c *i2c)
>   	}
>   }
>   
> -static void xiic_wakeup(struct xiic_i2c *i2c, int code)
> +static void xiic_wakeup(struct xiic_i2c *i2c, enum xilinx_i2c_state code)
>   {
>   	i2c->tx_msg = NULL;
>   	i2c->rx_msg = NULL;
> @@ -383,7 +383,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
>   	u32 clr = 0;
>   	int xfer_more = 0;
>   	int wakeup_req = 0;
> -	int wakeup_code = 0;
> +	enum xilinx_i2c_state wakeup_code = STATE_DONE;
>   	int ret;
>   
>   	/* Get the interrupt Status from the IPIF. There is no clearing of

Acked-by: Michal Simek <michal.simek@amd.com>

M

  reply	other threads:[~2022-06-14  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  6:18 [PATCH v3] i2c-xiic: Fix the type check for xiic_wakeup Shubhrajyoti Datta
2022-06-14  9:01 ` Michal Simek [this message]
2022-06-14 19:38 ` 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=d5e8d7fb-a89f-123a-cae0-1766996c2e8c@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