Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615837

Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations
Date 2017-04-04 11:50 +0200
Message-ID <tstg6-33o-19@gated-at.bofh.it> (permalink)
References <tssN4-2Tq-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-04-04 11:20 +0200
  Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a  blank line after declarations Dan Carpenter <dan.carpenter@oracle.com> - 2017-04-04 11:50 +0200
    Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank  line after declarations Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-04-04 12:10 +0200
    Re: [lustre-devel] [PATCH] drivers/staging/lustre:  Coding-guideline: Missing a blank line after declarations "Dilger, Andreas" <andreas.dilger@intel.com> - 2017-04-05 12:00 +0200
    RE: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a  blank line after declarations "Hammond, John" <john.hammond@intel.com> - 2017-04-05 15:50 +0200

csiph-web