On 04/01/2021 13:38, Andy Shevchenko wrote: > On Mon, Jan 4, 2021 at 3:02 PM Daniel Scally <djrscally@xxxxxxxxx> 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