lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB7081D6946B12E3866502B833E7549@DM6PR04MB7081.namprd04.prod.outlook.com>
Date:   Mon, 10 May 2021 09:54:06 +0000
From:   Damien Le Moal <Damien.LeMoal@....com>
To:     wjc <wjc@...rlc.com>, Naohiro Aota <Naohiro.Aota@....com>,
        "jth@...nel.org" <jth@...nel.org>
CC:     "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] zonefs: Macros with complex values should be enclosed in
 parentheses

On 2021/05/10 18:18, wjc wrote:
> Macros with complex values should be enclosed in parentheses
> 
> Signed-off-by: wjc <wjc@...rlc.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ