lkml.org 
[lkml]   [2021]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 15/15] ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver
On Mon, Jan 4, 2021 at 3:02 PM Daniel Scally <djrscally@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.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-01-04 14:40    [W:0.067 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site