Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbdDDJlS (ORCPT ); Tue, 4 Apr 2017 05:41:18 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:21485 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbdDDJlQ (ORCPT ); Tue, 4 Apr 2017 05:41:16 -0400 Date: Tue, 4 Apr 2017 12:38:52 +0300 From: Dan Carpenter To: Pushkar Jambhlekar Cc: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman , "John L. Hammond" , Al Viro , Lai Siyao , James Nunez , Andrew Perepechko , wang di , Bob Glossman , Andreas Gruenbacher , Jinshan Xiong , Bobi Jam , "Kirill A. Shutemov" , Henri Doreau , Prakash Surya , Emoly Liu , Dmitry Eremin , Johann Lombardi , 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 Message-ID: <20170404093851.GB4521@mwanda> References: <1491297326-28973-1-git-send-email-pushkar.iit@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491297326-28973-1-git-send-email-pushkar.iit@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1048 Lines: 26 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