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] [day] [month] [year] [list]
Date:	Wed, 21 Dec 2011 11:37:04 +0000
From:	Andy Whitcroft <apw@...onical.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Dong Aisheng-B29396 <B29396@...escale.com>,
	Rob Herring <robherring2@...il.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	Guo Shawn-R65073 <r65073@...escale.com>
Subject: Re: [PATCH 1/1] dt: fix some code indent issue in of.h

On Tue, Dec 20, 2011 at 07:06:22PM -0800, Joe Perches wrote:
> On Wed, 2011-12-21 at 02:57 +0000, Dong Aisheng-B29396 wrote:
> > > On 12/20/2011 12:10 PM, Dong Aisheng wrote:
> > > > From: Dong Aisheng <dong.aisheng@...aro.org>
> > > > Checkpatch script will report some warnings for the old coding style:
> > > > WARNING: suspect code indent for conditional statements (8, 0)
> > > >         for (child = of_get_next_child(parent, NULL); child != NULL; \
> > > > [...]
> []
> > > > diff --git a/include/linux/of.h b/include/linux/of.h index
> []
> > > > @@ -163,22 +163,22 @@ extern struct device_node *of_find_node_by_name(struct
> > > device_node *from,
> > > >  	const char *name);
> > > >  #define for_each_node_by_name(dn, name) \
> > > >  	for (dn = of_find_node_by_name(NULL, name); dn; \
> > > > -	     dn = of_find_node_by_name(dn, name))
> > > > +		dn = of_find_node_by_name(dn, name))
> > > The old way looks fine to me and indenting like this is commonly used in the
> > > kernel.
> > Yes, i was also ok without those annoying warning.
> > Do you think if we need to fix the checkpatch.pl if the it is commonly used
> > In the kernel?
> 
> I don't.  I think it's better for people to realize that
> checkpatch is and will always be an imperfect tool and
> that they should learn to ignore inappropriate warnings.

Right.  Checkpatch is simply a helper, if you have checkpatch warnings
in a patch you are submitting then you need to be able to mentally
justify them.  It is there to catch the basic stuff that wastes so much
of the reviewers time and to help you get your patches accepted quicker.
It is not a substitute for your own common sense.

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