From: Michal Simek <michal.simek@xilinx.com>
To: Wolfram Sang <wsa@kernel.org>,
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
<linux-i2c@vger.kernel.org>, <michal.simek@xilinx.com>,
<git@xilinx.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] i2c-xiic: Fix the type check for xiic_wakeup
Date: Tue, 14 Jun 2022 09:01:26 +0200 [thread overview]
Message-ID: <36da7a53-9bb4-26ae-0ac5-1ebcdf0ac695@xilinx.com> (raw)
In-Reply-To: <YqdPtexPiukMlUcG@shikoro>
Hi Wolfram,
On 6/13/22 16:54, Wolfram Sang wrote:
> On Mon, Jun 13, 2022 at 10:00:02AM +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>
>
> What is the difference to the V2 you sent 4 days earlier?
>
>> enum xilinx_i2c_state {
>> - STATE_DONE,
>> - STATE_ERROR,
>> - STATE_START
>> + STATE_DONE = 0,
>> + STATE_ERROR = 1,
>> + STATE_START = 2
>
> No need for initializers.
Actually this was recommended by Greg in one of our thread here.
https://lore.kernel.org/all/20200318125003.GA2727094@kroah.com/
That's why we started to initialize all values in enums in our code.
It shouldn't be really any problem to do so.
Thanks,
Michal
next prev parent reply other threads:[~2022-06-14 7:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 4:30 [PATCH v2] i2c-xiic: Fix the type check for xiic_wakeup Shubhrajyoti Datta
2022-06-13 14:54 ` Wolfram Sang
2022-06-14 6:30 ` Shubhrajyoti Datta
2022-06-14 7:01 ` Michal Simek [this message]
2022-06-14 8:11 ` Wolfram Sang
2022-06-14 8:18 ` Greg Kroah-Hartman
2022-06-14 9:01 ` Michal Simek
-- strict thread matches above, loose matches on Subject: below --
2022-06-09 15:37 Shubhrajyoti Datta
2022-06-09 15:55 ` Michal Simek
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=36da7a53-9bb4-26ae-0ac5-1ebcdf0ac695@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=git@xilinx.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=shubhrajyoti.datta@xilinx.com \
--cc=wsa@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.