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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180115150028.GA10946@kroah.com>
Date:   Mon, 15 Jan 2018 16:00:28 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Fabian Huegel <fabian_huegel@....de>
Cc:     Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        Lai Siyao <lai.siyao@...el.com>,
        "John L . Hammond" <john.hammond@...el.com>,
        devel@...verdev.osuosl.org, Ben Evans <bevans@...y.com>,
        NeilBrown <neilb@...e.com>,
        Christoph Volkert <linux@...istoph-volkert.de>,
        linux-kernel@...cs.fau.de, linux-kernel@...r.kernel.org,
        lustre-devel@...ts.lustre.org
Subject: Re: [PATCH 1/8] staging: lustre: Enclose complex macros in
 parentheses

On Thu, Jan 11, 2018 at 06:16:55PM +0100, Fabian Huegel wrote:
> Checkpatch wants complex macros to be enclosed in parentheses, so we
> put parentheses around these four macros.
> 
> Signed-off-by: Fabian Huegel <fabian_huegel@....de>
> Signed-off-by: Christoph Volkert <linux@...istoph-volkert.de>
> ---
>  drivers/staging/lustre/lustre/include/obd_class.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
> index 67c535c..5c8cf30 100644
> --- a/drivers/staging/lustre/lustre/include/obd_class.h
> +++ b/drivers/staging/lustre/lustre/include/obd_class.h
> @@ -294,10 +294,10 @@ struct obdo;
>  
>  void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);
>  
> -#define OBT(dev)	(dev)->obd_type
> -#define OBP(dev, op)    (dev)->obd_type->typ_dt_ops->op
> -#define MDP(dev, op)    (dev)->obd_type->typ_md_ops->op
> -#define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op
> +#define OBT(dev)	((dev)->obd_type)
> +#define OBP(dev, op)    ((dev)->obd_type->typ_dt_ops->op)
> +#define MDP(dev, op)    ((dev)->obd_type->typ_md_ops->op)
> +#define CTXTP(ctxt, op) ((ctxt)->loc_logops->lop_##op)

That really doesn't make any sense, as this can only be a variable in
here, not any "complex expression".  Sometimes checkpatch.pl isn't very
smart.

Also, these macros are horridly named, odds are they are not even
needed...

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ