[LTP] [PATCH 2/3] fanotify10: Add support for multiple event files

Cyril Hrubis chrubis@suse.cz
Tue Nov 22 13:56:23 CET 2022


Hi!
> > This is minor, but I would have named the macro FOREACH_PATH() and
> > added
> 
> This is actually not in line with the kernel style. At least IIRC
> foreach macros are lower case in the instances I have seen. This is also
> what we have in tst_cgroup.c for e.g.
> 
> > curly braces around the block. And the same for the rest of the
> > invocations.
> 
> At some point checkpatch stopped complaining about this, so it's now the
> authors discretion whether to use curly braces in these cases. Unless
> there is something wrong with our checkpatch.

I do not think that this was ever enforced by checkpatch.

> IMO there is no mistaking that it is a loop macro with one function call
> in the body.

I tend to put the curly braces everywhere where there is a multiline
macro/function call because I find that way easier on the eyes...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list