From: Dan Carpenter <dan.carpenter@oracle.com>
To: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
James Simmons <jsimmons@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"John L. Hammond" <john.hammond@intel.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Lai Siyao <lai.siyao@intel.com>,
James Nunez <james.a.nunez@intel.com>,
Andrew Perepechko <andrew.perepechko@seagate.com>,
wang di <di.wang@intel.com>,
Bob Glossman <bob.glossman@intel.com>,
Andreas Gruenbacher <agruenba@redhat.com>,
Jinshan Xiong <jinshan.xiong@intel.com>,
Bobi Jam <bobijam@hotmail.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Henri Doreau <henri.doreau@cea.fr>,
Prakash Surya <surya1@llnl.gov>, Emoly Liu <emoly.liu@intel.com>,
Dmitry Eremin <dmitry.eremin@intel.com>,
Johann Lombardi <johann.lombardi@intel.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
lustre-devel@lists.lustre.org
Subject: Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations
Date: Tue, 4 Apr 2017 12:38:52 +0300 [thread overview]
Message-ID: <20170404093851.GB4521@mwanda> (raw)
In-Reply-To: <1491297326-28973-1-git-send-email-pushkar.iit@gmail.com>
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.
regards,
dan carpenter
next prev parent reply other threads:[~2017-04-04 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 9:15 [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations Pushkar Jambhlekar
2017-04-04 9:38 ` Dan Carpenter [this message]
2017-04-04 10:05 ` Pushkar Jambhlekar
2017-04-05 9:54 ` [lustre-devel] " Dilger, Andreas
2017-04-05 13:41 ` Hammond, John
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=20170404093851.GB4521@mwanda \
--to=dan.carpenter@oracle.com \
--cc=agruenba@redhat.com \
--cc=andreas.dilger@intel.com \
--cc=andrew.perepechko@seagate.com \
--cc=bob.glossman@intel.com \
--cc=bobijam@hotmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=di.wang@intel.com \
--cc=dmitry.eremin@intel.com \
--cc=emoly.liu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=henri.doreau@cea.fr \
--cc=james.a.nunez@intel.com \
--cc=jinshan.xiong@intel.com \
--cc=johann.lombardi@intel.com \
--cc=john.hammond@intel.com \
--cc=jsimmons@infradead.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=lai.siyao@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=pushkar.iit@gmail.com \
--cc=surya1@llnl.gov \
--cc=viro@zeniv.linux.org.uk \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox