[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y2VNSXKPLYvaGkp3@smile.fi.intel.com>
Date: Fri, 4 Nov 2022 19:35:05 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 1/2] device property: Get rid of
__PROPERTY_ENTRY_ARRAY_EL*SIZE*()
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
Powered by blists - more mailing lists