]> Git Repo - linux.git/commitdiff
fanotify: delete useless parenthesis in FANOTIFY_INLINE_FH macro
authorAlexey Dobriyan <[email protected]>
Tue, 10 Oct 2023 11:44:35 +0000 (14:44 +0300)
committerJan Kara <[email protected]>
Tue, 10 Oct 2023 12:35:29 +0000 (14:35 +0200)
Parenthesis around identifier name in declaration are useless.
This is just "put every macro argument inside parenthesis" practice.

Now "size" must be constant expression, but using comma expression in
constant expression is useless too, therefore [] will guard "size"
expression just as well as ().

Also g++ is somewhat upset about these:

fs/notify/fanotify/fanotify.h:278:28: warning: unnecessary parentheses in declaration of ‘object_fh’ [-Wparentheses]
  278 |         struct fanotify_fh (name);

Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Message-Id: <633c251a-b548-4428-9e91-1cf8147d8c55@p183>

fs/notify/fanotify/fanotify.h

index e8a3c28c5d12032c473512016af20958285616c2..6936671e148dbe32535af1bef6e2ba9ca05013e3 100644 (file)
@@ -275,9 +275,9 @@ static inline void fanotify_init_event(struct fanotify_event *event,
 
 #define FANOTIFY_INLINE_FH(name, size)                                 \
 struct {                                                               \
-       struct fanotify_fh (name);                                      \
+       struct fanotify_fh name;                                        \
        /* Space for object_fh.buf[] - access with fanotify_fh_buf() */ \
-       unsigned char _inline_fh_buf[(size)];                           \
+       unsigned char _inline_fh_buf[size];                             \
 }
 
 struct fanotify_fid_event {
This page took 0.056655 seconds and 4 git commands to generate.