LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Chen Yu <yu.c.chen@intel.com>
Cc: linux-acpi@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>, Len Brown <lenb@kernel.org>,
Ashok Raj <ashok.raj@intel.com>, Mike Rapoport <rppt@kernel.org>,
Aubrey Li <aubrey.li@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver
Date: Mon, 8 Nov 2021 11:20:22 +0200 [thread overview]
Message-ID: <YYjr1jHnlE7sPb8i@smile.fi.intel.com> (raw)
In-Reply-To: <20211106151456.GA570347@chenyu-desktop>
On Sat, Nov 06, 2021 at 11:14:56PM +0800, Chen Yu wrote:
> On Wed, Nov 03, 2021 at 07:32:09PM +0200, Andy Shevchenko wrote:
> > On Wed, Nov 03, 2021 at 11:43:50PM +0800, Chen Yu wrote:
...
> > > +enum cap_index {
> > > + CAP_STATUS_IDX = 0,
> > > + CAP_UPDATE_IDX = 1,
> > > + CAP_CODE_TYPE_IDX = 2,
> > > + CAP_FW_VER_IDX = 3,
> > > + CAP_CODE_RT_VER_IDX = 4,
> > > + CAP_DRV_TYPE_IDX = 5,
> > > + CAP_DRV_RT_VER_IDX = 6,
> > > + CAP_DRV_SVN_IDX = 7,
> > > + CAP_PLAT_ID_IDX = 8,
> > > + CAP_OEM_ID_IDX = 9,
> > > + CAP_OEM_INFO_IDX = 10,
> >
> > > + CAP_NR_IDX = 11
> >
> > Assignment here doesn't make any sense (it just adds unneeded churn and
> > burden). Same to the rest of similar cases below.
> >
> Greg mentioned that, we might need to "explicit about the numbers here, because it
> is uncerntain this is guaranteed by all C compilers or not."
> https://lore.kernel.org/lkml/YXj+QaMcCeV71XbI@kroah.com/
> My understanding is that, this applys to both uapi headers and the kernel internal
> headers.
I was talking only about the last item. This is guaranteed to be LAST+1 by the
C standard and any deviation from that is a compiler bug that must be fixed.
The first elements may be explicitly defined so we will be sure they are always
stay. Greg is right about it.
> > > +};
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-11-08 9:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 15:42 [PATCH v8 0/4] Introduce Platform Firmware Runtime Update and Telemetry drivers Chen Yu
2021-11-03 15:43 ` [PATCH v8 1/4] efi: Introduce EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER and corresponding structures Chen Yu
2021-11-18 15:49 ` Rafael J. Wysocki
2021-11-18 16:11 ` Chen Yu
2021-11-18 18:43 ` Rafael J. Wysocki
2021-11-03 15:43 ` [PATCH v8 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Chen Yu
2021-11-03 17:32 ` Andy Shevchenko
2021-11-06 15:14 ` Chen Yu
2021-11-08 9:20 ` Andy Shevchenko [this message]
2021-11-08 12:08 ` Chen Yu
2021-11-03 15:44 ` [PATCH v8 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry Chen Yu
2021-11-03 17:33 ` Andy Shevchenko
2021-11-03 15:44 ` [PATCH v8 4/4] tools: Introduce power/acpi/pfru/pfru Chen Yu
2021-11-03 17:34 ` Andy Shevchenko
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=YYjr1jHnlE7sPb8i@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=ardb@kernel.org \
--cc=ashok.raj@intel.com \
--cc=aubrey.li@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rppt@kernel.org \
--cc=yu.c.chen@intel.com \
--subject='Re: [PATCH v8 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).