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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Aug 2014 14:26:02 -0700
From:	Joe Perches <joe@...ches.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Andy Whitcroft <apw@...onical.com>,
	Srikrishan Malik <srikrishanmalik@...il.com>, greg@...ah.com,
	andreas.dilger@...el.com, oleg.drokin@...el.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/12] staging: lustre: Add missing spaces around
 operators and braces.

On Wed, 2014-08-06 at 23:45 +0300, Dan Carpenter wrote:
> On Wed, Aug 06, 2014 at 01:31:46PM -0700, Joe Perches wrote:
> > On Wed, 2014-08-06 at 23:13 +0300, Dan Carpenter wrote:
> > > On Wed, Aug 06, 2014 at 10:42:55PM +0530, Srikrishan Malik wrote:
> > > > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
> > []
> > > > @@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,
> > > >  			    __u64 bits)
> > > >  {
> > > >  	struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
> > > > -	ldlm_policy_data_t policy = {{0}};
> > > > +	ldlm_policy_data_t policy = {{0} };
> > > 
> > > That's odd.  Since when is a space required here?  Anyway, put one at
> > > the start too if you're goind to do that.  Or you could do it like:
> > > 
> > > 	ldlm_policy_data_t policy = {};
> > > 
> > > ?
> > 
> > It comes from a pretty old bit of checkpatch:
> > 
> > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3706) # closing brace should have a space following it when it has anything
> > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3707) # on the line
> > de7d4f0e (Andy Whitcroft 2007-07-15 23:37:22 -0700 3708)                if ($line =~ /}(?!(?:,|;|\)))\S/) {
> > 
> > Maybe it should have an } added to the test like:
> > 
> > if ($line =~ /}(?!(?:,|;|\)|}))\S/) {
> >
> 
> Yes.  It feels like '}}' is common.

I think so too.  Also, there isn't an equivalent
test for '{{' so warning on '}}' seems silly.

> Also it should ignore \. because this used for:
> 
> ERROR: space required after that close brace '}'
> #118: FILE: ./drivers/gpu/drm/nouveau/core/engine/disp/nva3.c:118:
> +}.base.base;
> 
> Otherwise this test is legit and complains about bad typedefs and
> '}else{' statements.

I don't think \. should be added myself.

Only nouveau uses that style.

I think all of those nouveau uses are not
very nice and they should be changed instead
or the warnings should just be ignored there.

Andy?

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ