All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] zonefs: Macros with complex values should be enclosed in parentheses
       [not found] <20210510091800.50799-1-wjc@cdjrlc.com>
@ 2021-05-10  9:54 ` Damien Le Moal
  0 siblings, 0 replies; only message in thread
From: Damien Le Moal @ 2021-05-10  9:54 UTC (permalink / raw)
  To: wjc, Naohiro Aota, jth; +Cc: linux-fsdevel, linux-kernel

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-10  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210510091800.50799-1-wjc@cdjrlc.com>
2021-05-10  9:54 ` [PATCH] zonefs: Macros with complex values should be enclosed in parentheses Damien Le Moal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.