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  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]
Date:	Mon, 11 Aug 2014 04:36:47 -0700
From:	Joe Perches <joe@...ches.com>
To:	Srikrishan Malik <srikrishanmalik@...il.com>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>, greg@...ah.com,
	andreas.dilger@...el.com, oleg.drokin@...el.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>,
	Himangi Saraogi <himangi774@...il.com>
Subject: Re: [PATCH 10/12] staging: lustre: Fix misplaced opening brace
 warnings

On Mon, 2014-08-11 at 16:27 +0530, Srikrishan Malik wrote:
> On Thu, Aug 07, 2014 at 09:35:43AM -0700, Joe Perches wrote:
> > On Thu, 2014-08-07 at 19:01 +0300, Dan Carpenter wrote:
> > > On Thu, Aug 07, 2014 at 09:01:36PM +0530, Srikrishan Malik wrote:
> > > > On Wed, Aug 06, 2014 at 11:18:13PM +0300, Dan Carpenter wrote:
> > > > > That looks silly before and after.  Everything is indented in a funny
> > > > > way.
> > > > 
> > > > Is this better:
> > > > 
> > > > 	static const ldlm_policy_data_t lookup_policy = {
> > > > 				.l_inodebits = { MDS_INODELOCK_LOOKUP }
> > > > 	};
> > > > 
> > > 
> > > That is indented too far.
> > > 
> > > Honestly, I think it looks best on one line but in terms of real life we
> > > can't ignore checkpatch warnings because eventually someone else will
> > > try to "fix" it to not be on one line.
[]
> > I think it looks odd to mix named and unnamed
> > initializers for the typedef and its members.
> > 
> > ldlm_policy_data_t is a union and it could be
> > explicit instead of a typedef.
> > 
> > Perhaps:
> > 	static const union ldlm_policy_data lookup_policy = {
> > 		.l_inodebits = {
> > 			.bits = MDS_INODELOCK_LOOKUP,
> > 		},
> > 	};
> > 
> > or maybe use another DECLARE_<foo> macro indirection.
> >
> 
> This patch set is aimed at removing checkpatch issues from files in
> lustre/lustre/mdc.

I think eliminating checkpatch identified issues should
not be the primary goal but a secondary one to the
overall goal of code style uniformity.

Julia Lawall and Himangi Saraogi from coccinelle fame
have created a "detypedef" script that is useful for
structs, perhaps you could extend it for unions and
run it over this lustre code.

For instance:
https://lkml.org/lkml/2014/8/9/104

> Is it ok if I just fix those in this set and post another patch set
> to take care of other issues identified in review?

Up to you.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists