* [PATCH v3] i2c-xiic: Fix the type check for xiic_wakeup
@ 2022-06-14 6:18 Shubhrajyoti Datta
2022-06-14 9:01 ` Michal Simek
2022-06-14 19:38 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Shubhrajyoti Datta @ 2022-06-14 6:18 UTC (permalink / raw)
To: linux-i2c; +Cc: michal.simek, git, Shubhrajyoti Datta
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
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i2c-xiic: Fix the type check for xiic_wakeup
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
2022-06-14 19:38 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2022-06-14 9:01 UTC (permalink / raw)
To: Shubhrajyoti Datta, linux-i2c; +Cc: michal.simek, git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i2c-xiic: Fix the type check for xiic_wakeup
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
@ 2022-06-14 19:38 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-06-14 19:38 UTC (permalink / raw)
To: Shubhrajyoti Datta; +Cc: linux-i2c, michal.simek, git
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
On Tue, Jun 14, 2022 at 11:48:55AM +0530, 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>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-14 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-06-14 19:38 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox