On 04/01/2021 13:38, Andy Shevchenko wrote: > On Mon, Jan 4, 2021 at 3:02 PM Daniel Scally <djrsca...@gmail.com> wrote: >> On 04/01/2021 12:09, Andy Shevchenko wrote: >>> On Sun, Jan 03, 2021 at 11:12:35PM +0000, Daniel Scally wrote: > ... > >>>> +#define NODE_SENSOR(_HID, _PROPS) \ >>>> + ((const struct software_node) { \ >>>> + .name = _HID, \ >>>> + .properties = _PROPS, \ >>>> + }) >>>> + >>>> +#define NODE_PORT(_PORT, _SENSOR_NODE) \ >>>> + ((const struct software_node) { \ >>>> + .name = _PORT, \ >>>> + .parent = _SENSOR_NODE, \ >>>> + }) >>>> + >>>> +#define NODE_ENDPOINT(_EP, _PORT, _PROPS) \ >>>> + ((const struct software_node) { \ >>>> + .name = _EP, \ >>>> + .parent = _PORT, \ >>>> + .properties = _PROPS, \ >>>> + }) >>> In all three I didn't get why you need outer parentheses. Without them it >>> will >>> be well defined compound literal and should work as is. >> The code works fine, but checkpatch complains that macros with complex >> values should be enclosed in parentheses. I guess now that I'm more >> familiar with the code I'd call that a false-positive though, as nowhere >> else in the kernel that I've seen encloses them the same way. > I guess it is yet another false positive from checkpatch. > I would ignore its complaints. Will do so then
- [PATCH v4 02/15] media: ipu3-cio2: Add headers that ipu3-c... Daniel Scally
- [PATCH v4 04/15] property: Call fwnode_graph_get_endpoint_... Daniel Scally
- [PATCH v4 06/15] software_node: unregister software_nodes ... Daniel Scally
- [PATCH v4 11/15] ipu3-cio2: Rename ipu3-cio2.c Daniel Scally
- [PATCH v4 14/15] include: media: v4l2-fwnode: Include v4l2... Daniel Scally
- Re: [PATCH v4 14/15] include: media: v4l2-fwnode: Inc... Andy Shevchenko
- [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge to ipu3-cio2 d... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge to ip... Andy Shevchenko
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge t... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-brid... Andy Shevchenko
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge to ip... Kieran Bingham
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge t... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-brid... Andy Shevchenko
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-brid... Kieran Bingham
- Re: [PATCH v4 15/15] ipu3-cio2: Add cio2-... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: Add ... Kieran Bingham
- Re: [PATCH v4 15/15] ipu3-cio2: ... Daniel Scally
- Re: [PATCH v4 15/15] ipu3-cio2: ... Kieran Bingham
- Re: [PATCH v4 15/15] ipu3-cio2: ... Daniel Scally
- [PATCH v4 13/15] acpi: Add acpi_dev_get_next_match_dev() a... Daniel Scally