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] [day] [month] [year] [list]
Date:   Wed, 5 Apr 2017 13:41:47 +0000
From:   "Hammond, John" <john.hammond@...el.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Pushkar Jambhlekar <pushkar.iit@...il.com>
CC:     "Drokin, Oleg" <oleg.drokin@...el.com>,
        "Dilger, Andreas" <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        "Siyao, Lai" <lai.siyao@...el.com>,
        "Nunez, James A" <james.a.nunez@...el.com>,
        Andrew Perepechko <andrew.perepechko@...gate.com>,
        "Wang, Di" <di.wang@...el.com>,
        "Glossman, Bob" <bob.glossman@...el.com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        "Xiong, Jinshan" <jinshan.xiong@...el.com>,
        Bobi Jam <bobijam@...mail.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Henri Doreau <henri.doreau@....fr>,
        Prakash Surya <surya1@...l.gov>,
        "Liu, Emoly" <emoly.liu@...el.com>,
        "Eremin, Dmitry" <dmitry.eremin@...el.com>,
        "Lombardi, Johann" <johann.lombardi@...el.com>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "lustre-devel@...ts.lustre.org" <lustre-devel@...ts.lustre.org>
Subject: RE: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a
 blank line after declarations

> On Tue, Apr 04, 2017 at 02:45:26PM +0530, Pushkar Jambhlekar wrote:
> > diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c
> > b/drivers/staging/lustre/lustre/obdclass/cl_page.c
> > index cd9a40c..71fcc4c 100644
> > --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
> > +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
> > @@ -482,6 +482,7 @@ void cl_page_disown0(const struct lu_env *env,
> > int cl_page_is_owned(const struct cl_page *pg, const struct cl_io *io)
> > {
> >  	struct cl_io *top = cl_io_top((struct cl_io *)io);
> > +
> >  	LINVRNT(cl_object_same(pg->cp_obj, io->ci_obj));
> >  	return pg->cp_state == CPS_OWNED && pg->cp_owner == top;  }
> 
> This is not related to the patch but I don't understand CLOBINVRNT() and
> LINVRNT().
> 
> # define LINVRNT(exp) LASSERT(exp)
> # define LINVRNT(exp) ((void)sizeof !!(exp))
> 
> Why do we do the sizeof() instead of just an empty define?  The compiler
> calculates the size at compile time and doesn't execute the expression so it's the
> same as an empty define so far as I can tell.

This is someone's attempt to avoid the unused variable warnings which would occur
in some places when LINVRNT(exp) is defined as ((void)0).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ