linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: wjc <wjc@cdjrlc.com>, Naohiro Aota <Naohiro.Aota@wdc.com>,
	"jth@kernel.org" <jth@kernel.org>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] zonefs: Macros with complex values should be enclosed in parentheses
Date: Mon, 10 May 2021 09:54:06 +0000	[thread overview]
Message-ID: <DM6PR04MB7081D6946B12E3866502B833E7549@DM6PR04MB7081.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20210510091800.50799-1-wjc@cdjrlc.com>

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

           reply	other threads:[~2021-05-10  9:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20210510091800.50799-1-wjc@cdjrlc.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR04MB7081D6946B12E3866502B833E7549@DM6PR04MB7081.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=jth@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wjc@cdjrlc.com \
    --subject='Re: [PATCH] zonefs: Macros with complex values should be enclosed in parentheses' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).