All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Wolfram Sang <wsa@kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	linux-i2c@vger.kernel.org, git@xilinx.com
Subject: Re: [PATCH v2] i2c-xiic: Fix the type check for xiic_wakeup
Date: Tue, 14 Jun 2022 10:18:59 +0200	[thread overview]
Message-ID: <YqhEc1XCyHUqOIMy@kroah.com> (raw)
In-Reply-To: <YqhCvJdWw+g9ZZFL@shikoro>

On Tue, Jun 14, 2022 at 10:11:40AM +0200, Wolfram Sang wrote:
> 
> > Actually this was recommended by Greg in one of our thread here.
> > https://lore.kernel.org/all/20200318125003.GA2727094@kroah.com/
> 
> It is in the C standard, so any compiler not adhering to it has a bug.

Possibly, yes, but for enums that are part of the UAPI, we should
explicitly set them to be sure as we do not control what userspace
compilers are ever used.

Also when dealing with values that are reflected in hardware, it's good
to be explicit to help document the interface as well.

> It is especially not important here because we use the enums only
> locally and do not export.

Local stuff is fine, no need to set as there's no abi issues here.

thanks,

greg k-h

  reply	other threads:[~2022-06-14  8:19 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
2022-06-14  8:11     ` Wolfram Sang
2022-06-14  8:18       ` Greg Kroah-Hartman [this message]
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=YqhEc1XCyHUqOIMy@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=git@xilinx.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --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.