From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v1 1/2] device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*()
Date: Fri, 4 Nov 2022 19:35:05 +0200 [thread overview]
Message-ID: <Y2VNSXKPLYvaGkp3@smile.fi.intel.com> (raw)
In-Reply-To: <20221104154849.35177-1-andriy.shevchenko@linux.intel.com>
On Fri, Nov 04, 2022 at 05:48:48PM +0200, Andy Shevchenko wrote:
> First of all, _ELEMENT_SIZE() repeats existing sizeof_field() macro.
> Second, usage of _ARRAY_ELSIZE_LEN() adds unnecessary indirection
> to the data layout. It's more understandable when the data structure
> is placed explicitly. That said, get rid of those macros by replacing
> them with the existing helper and explicit data structure layout.
...
> +(struct property_entry) { \
> + .name = _name_, \
> + .length = (_len_) * sizeof(struct software_node_ref_args), \
> + .type = DEV_PROP_##_Type_, \
> + .pointer = _val_, \
While waiting for the comments, I have noticed missed {} here. I haven't
checked if gcc 5.1 still requires that, but in any case that should be matter
of a separate patch (to drop {} for anonymous union members initialization).
That said, v2 will occur if no serious objection is provided.
> +}
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2022-11-04 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 15:48 [PATCH v1 1/2] device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*() Andy Shevchenko
2022-11-04 15:48 ` [PATCH v1 2/2] device property: Move PROPERTY_ENTRY_BOOL() a bit down Andy Shevchenko
2022-11-04 17:35 ` Andy Shevchenko [this message]
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=Y2VNSXKPLYvaGkp3@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.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