Re: [PATCH] zonefs: Macros with complex values should be enclosed in parentheses

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

 



On 2021/05/10 18:18, wjc wrote:
> Macros with complex values should be enclosed in parentheses
> 
> Signed-off-by: wjc <wjc@xxxxxxxxxx>

Please use your full name for your Signed-off-by tag.

> ---
>  fs/zonefs/trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/zonefs/trace.h b/fs/zonefs/trace.h
> index f369d7d50303..5b0c87d331a1 100644
> --- a/fs/zonefs/trace.h
> +++ b/fs/zonefs/trace.h
> @@ -17,7 +17,7 @@
>  
>  #include "zonefs.h"
>  
> -#define show_dev(dev) MAJOR(dev), MINOR(dev)
> +#define show_dev(dev) (MAJOR(dev), MINOR(dev))

This macro is used in TP_printk() to specify 2 print arguments. Changing it like
you did does not even compile. Seriously, at least please compile test.

If this is from a static code analyzer, then suppressing the warning needs to be
done by removing this macro entirely.

>  
>  TRACE_EVENT(zonefs_zone_mgmt,
>  	    TP_PROTO(struct inode *inode, enum req_opf op),
> 


-- 
Damien Le Moal
Western Digital Research




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

  Powered by Linux