[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-11-02 Thread Bruce Richardson
On Mon, Nov 02, 2015 at 10:28:35AM +, Van Haaren, Harry wrote: > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon > > Subject: Re: [dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper > > > > 2015-10-30 16:16, Bruce Richardson: > > >

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-11-02 Thread Van Haaren, Harry
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon > Subject: Re: [dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper > > 2015-10-30 16:16, Bruce Richardson: > > Another request, can you perhaps also fix the script for situations where > > che

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-30 Thread Thomas Monjalon
2015-10-30 16:16, Bruce Richardson: > Another request, can you perhaps also fix the script for situations where > checkpatch.pl is not in the kernel tree. I've used this script now to check a > couple of patchsets, which came back clean, but it turns out that because I > was > using checkpatch.pl

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-30 Thread Bruce Richardson
On Thu, Oct 29, 2015 at 02:57:42PM +0100, Thomas Monjalon wrote: > 2015-10-29 14:54, David Marchand: > > On Thu, Oct 29, 2015 at 2:48 PM, Bruce Richardson wrote: > > > On Thu, Oct 29, 2015 at 02:34:32PM +0100, Thomas Monjalon wrote: > > > > I agree with both of you. > > > > I could suggest somethin

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Thomas Monjalon
2015-10-29 14:54, David Marchand: > On Thu, Oct 29, 2015 at 2:48 PM, Bruce Richardson wrote: > > On Thu, Oct 29, 2015 at 02:34:32PM +0100, Thomas Monjalon wrote: > > > I agree with both of you. > > > I could suggest something but I'm afraid it will be difficult to have a > > > consensus between a "

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread David Marchand
On Thu, Oct 29, 2015 at 2:48 PM, Bruce Richardson < bruce.richardson at intel.com> wrote: > On Thu, Oct 29, 2015 at 02:34:32PM +0100, Thomas Monjalon wrote: > > I agree with both of you. > > I could suggest something but I'm afraid it will be difficult to have a > > consensus between a "quiet tool

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Thomas Monjalon
2015-10-29 13:24, Bruce Richardson: > On Thu, Oct 29, 2015 at 02:03:59PM +0100, Thomas Monjalon wrote: > > 2015-10-29 13:33, David Marchand: > > > On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon > > 6wind.com> > > > wrote: > > > > > > > +for p in "$@" ; do > > > > + printf -- "\n### $p\n\n

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Thomas Monjalon
2015-10-29 13:33, David Marchand: > On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon 6wind.com> > wrote: > > > +for p in "$@" ; do > > + printf -- "\n### $p\n\n" > > + report=$($DPDK_CHECKPATCH_PATH $options "$p" 2>/dev/null) > > + [ $? -ne 0 ] || continue > > + printf '%s

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Bruce Richardson
On Thu, Oct 29, 2015 at 02:34:32PM +0100, Thomas Monjalon wrote: > 2015-10-29 13:24, Bruce Richardson: > > On Thu, Oct 29, 2015 at 02:03:59PM +0100, Thomas Monjalon wrote: > > > 2015-10-29 13:33, David Marchand: > > > > On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon > > > 6wind.com> > > > > wrot

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread David Marchand
On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon wrote: > +for p in "$@" ; do > + printf -- "\n### $p\n\n" > + report=$($DPDK_CHECKPATCH_PATH $options "$p" 2>/dev/null) > + [ $? -ne 0 ] || continue > + printf '%s\n' "$report" | head -n -6 > + status=$(($status + 1))

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Bruce Richardson
On Thu, Oct 29, 2015 at 02:03:59PM +0100, Thomas Monjalon wrote: > 2015-10-29 13:33, David Marchand: > > On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon > 6wind.com> > > wrote: > > > > > +for p in "$@" ; do > > > + printf -- "\n### $p\n\n" > > > + report=$($DPDK_CHECKPATCH_PATH $opti

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-29 Thread Bruce Richardson
On Fri, Oct 23, 2015 at 05:53:25PM +0200, Thomas Monjalon wrote: > This script can be used to call checkpatch.pl from Linux with some > custom DPDK options. > > The path to the original Linux script must be set in an environment > variable. A script is added to load any configuration variables > r

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Thomas Monjalon
2015-10-23 09:58, Stephen Hemminger: > On Fri, 23 Oct 2015 18:34:23 +0200 > Thomas Monjalon wrote: > > > > LINUX_VERSION_CODE > > > > It is used for out-of-tree modules. > > Actually for the kernel modules, all flags should be enabled. > It is kernel code and it should follow the kernel sty

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Thomas Monjalon
2015-10-23 09:03, Stephen Hemminger: > Thomas Monjalon wrote: > > +options="$options --ignore=LINUX_VERSION_CODE,FILE_PATH_CHANGES,\ > > +VOLATILE,PREFER_PACKED,PREFER_ALIGNED,PREFER_PRINTF,PREFER_KERNEL_TYPES,\ > > +SPLIT_STRING,LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Thomas Monjalon
This script can be used to call checkpatch.pl from Linux with some custom DPDK options. The path to the original Linux script must be set in an environment variable. A script is added to load any configuration variables required by development tools from a file .develconfig, or ~/.config/dpdk/deve

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Stephen Hemminger
On Fri, 23 Oct 2015 18:34:23 +0200 Thomas Monjalon wrote: > > LINUX_VERSION_CODE > > It is used for out-of-tree modules. Actually for the kernel modules, all flags should be enabled. It is kernel code and it should follow the kernel style conventions.

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Stephen Hemminger
On Fri, 23 Oct 2015 18:34:23 +0200 Thomas Monjalon wrote: > > Please keep some of these: > > PARENTHESIS_ALIGNMENT > > It is not written in the DPDK coding rules that > "Alignment should match open parenthesis" I think code looks nicer if this rule is followed. Ditto for the LINE_SPACING ru

[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

2015-10-23 Thread Stephen Hemminger
On Fri, 23 Oct 2015 17:53:25 +0200 Thomas Monjalon wrote: > + > +# override default Linux options > +options="$options --max-line-length=$length" > +options="$options --show-types" > +options="$options --ignore=LINUX_VERSION_CODE,FILE_PATH_CHANGES,\ > +VOLATILE,PREFER_PACKED,PREFER_ALIGNED,PREFER