Re: [PATCH] fanotify: delete useless parenthesis in FANOTIFY_INLINE_FH macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 10-10-23 14:44:35, Alexey Dobriyan wrote:
> 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 <adobriyan@xxxxxxxxx>

Yeah, ok. Added to my tree. Thanks!

								Honza

> ---
> 
>  fs/notify/fanotify/fanotify.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/fs/notify/fanotify/fanotify.h
> +++ b/fs/notify/fanotify/fanotify.h
> @@ -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 {
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux