From: Joe Perches <joe@perches.com>
To: Jason Gunthorpe <jgg@ziepe.ca>, Knut Omang <knut.omang@oracle.com>
Cc: "Stephen Hemminger" <stephen@networkplumber.org>,
linux-kernel@vger.kernel.org,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Nicolas Palix" <nicolas.palix@imag.fr>,
"Jonathan Corbet" <corbet@lwn.net>,
"Santosh Shilimkar" <santosh.shilimkar@oracle.com>,
"Matthew Wilcox" <willy@infradead.org>,
cocci@systeme.lip6.fr, rds-devel@oss.oracle.com,
linux-rdma@vger.kernel.org, linux-doc@vger.kernel.org,
"Doug Ledford" <dledford@redhat.com>,
"Mickaël Salaün" <mic@digikod.net>,
"Shuah Khan" <shuah@kernel.org>,
linux-kbuild@vger.kernel.org,
"Michal Marek" <michal.lkml@markovi.net>,
"Julia Lawall" <Julia.Lawall@lip6.fr>,
"John Haxby" <john.haxby@oracle.com>,
"Åsmund Østvold" <asmund.ostvold@oracle.com>,
"Masahiro Yamada" <yamada.masahiro@socionext.com>
Subject: Re: [PATCH v2 0/5] Support for generalized use of make C={1,2} via a wrapper program
Date: Sun, 17 Dec 2017 22:00:17 -0800 [thread overview]
Message-ID: <1513576817.31581.58.camel@perches.com> (raw)
In-Reply-To: <20171218050043.GA1307@ziepe.ca>
On Sun, 2017-12-17 at 22:00 -0700, Jason Gunthorpe wrote:
> On Sun, Dec 17, 2017 at 03:14:10AM +0100, Knut Omang wrote:
>
> > > I like the ability to add more checkers and keep then in the main
> > > upstream tree. But adding overrides for specific subsystems goes against
> > > the policy that all subsystems should be treated equally.
> >
> > This is a tool to enable automated testing for as many checks as
> > possible, as soon as possible. Like any tool, it can be misused, but
> > that's IMHO an orthogonal problem that I think the maintainers will
> > be more than capable of preventing.
> >
> > Think of this as a tightening screw: We eliminate errors class by
> > class or file by file, and in the same commit narrows in the list of
> > exceptions. That way we can fix issues piece by piece while avoiding
> > a lot of regressions in already clean parts.
>
> Since you used drivers/infiniband as an example for this script..
>
> I will say I agree with this idea.
>
> It is not that we *want* infiniband to be different from the rest of
> the kernel, it is that we have this historical situation where we
> don't have a code base that already passes the various static checker
> things.
>
> I would like it very much if I could run 'make static checker' and see
> no warnings. This helps me know that I when I accept patches I am not
> introducing new problems to code that has already been cleaned up.
>
> Today when we run checkers we get so many warnings it is too hard to
> make any sense of it.
Here is a list of the checkpatch messages for drivers/infiniband
sorted by type.
Many of these might be corrected by using
$ ./scripts/checkpatch.pl -f --fix-inplace --types=<TYPE> \
$(git ls-files drivers/infiniband/)
5243 CHECK:CAMELCASE
4487 WARNING:LONG_LINE
1755 CHECK:PARENTHESIS_ALIGNMENT
1664 CHECK:SPACING
910 WARNING:FUNCTION_ARGUMENTS
742 CHECK:OPEN_ENDED_LINE
685 CHECK:BRACES
643 CHECK:UNNECESSARY_PARENTHESES
478 WARNING:SIZEOF_PARENTHESIS
361 WARNING:UNSPECIFIED_INT
342 WARNING:LONG_LINE_COMMENT
338 ERROR:SPACING
338 CHECK:LINE_SPACING
306 WARNING:SPLIT_STRING
278 WARNING:SPACING
242 WARNING:SYMBOLIC_PERMS
194 WARNING:BLOCK_COMMENT_STYLE
175 CHECK:BIT_MACRO
158 WARNING:SPACE_BEFORE_TAB
154 WARNING:LINE_SPACING
139 CHECK:MACRO_ARG_REUSE
133 CHECK:UNCOMMENTED_DEFINITION
122 CHECK:AVOID_BUG
103 CHECK:COMPARISON_TO_NULL
101 WARNING:ENOSYS
89 WARNING:BRACES
78 WARNING:PREFER_PR_LEVEL
74 WARNING:MULTILINE_DEREFERENCE
59 CHECK:TYPO_SPELLING
52 WARNING:EMBEDDED_FUNCTION_NAME
52 CHECK:MULTIPLE_ASSIGNMENTS
50 CHECK:PREFER_KERNEL_TYPES
45 WARNING:RETURN_VOID
39 WARNING:UNNECESSARY_ELSE
38 ERROR:POINTER_LOCATION
37 WARNING:ALLOC_WITH_MULTIPLY
36 CHECK:ALLOC_SIZEOF_STRUCT
35 CHECK:AVOID_EXTERNS
34 WARNING:PRINTK_WITHOUT_KERN_LEVEL
33 ERROR:CODE_INDENT
32 WARNING:PREFER_PACKED
32 CHECK:LOGICAL_CONTINUATIONS
29 WARNING:MEMORY_BARRIER
29 WARNING:LEADING_SPACE
28 WARNING:DEEP_INDENTATION
27 CHECK:USLEEP_RANGE
23 WARNING:SUSPECT_CODE_INDENT
23 ERROR:TRAILING_STATEMENTS
21 WARNING:LONG_LINE_STRING
20 WARNING:CONSIDER_KSTRTO
18 WARNING:CONSTANT_COMPARISON
18 ERROR:OPEN_BRACE
15 WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE
14 WARNING:VOLATILE
14 ERROR:SWITCH_CASE_INDENT_LEVEL
11 WARNING:OOM_MESSAGE
11 WARNING:INCLUDE_LINUX
10 WARNING:SSCANF_TO_KSTRTO
10 WARNING:INDENTED_LABEL
9 ERROR:GLOBAL_INITIALISERS
9 ERROR:COMPLEX_MACRO
9 ERROR:ASSIGN_IN_IF
8 WARNING:UNNECESSARY_BREAK
6 WARNING:PRINTF_L
6 WARNING:MISORDERED_TYPE
6 ERROR:INITIALISED_STATIC
5 WARNING:TABSTOP
5 WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO
5 WARNING:NAKED_SSCANF
4 WARNING:NEEDLESS_IF
4 ERROR:RETURN_PARENTHESES
4 CHECK:BOOL_COMPARISON
3 WARNING:TRAILING_SEMICOLON
3 WARNING:STATIC_CONST_CHAR_ARRAY
3 ERROR:TRAILING_WHITESPACE
2 WARNING:UNNECESSARY_PARENTHESES
2 WARNING:MISSING_SPACE
2 WARNING:LOGGING_CONTINUATION
2 CHECK:ARCH_DEFINES
1 WARNING:TYPECAST_INT_CONSTANT
1 WARNING:PREFER_DEV_LEVEL
1 WARNING:NR_CPUS
1 WARNING:NEW_TYPEDEFS
1 WARNING:MINMAX
1 WARNING:MACRO_WITH_FLOW_CONTROL
1 WARNING:LINE_CONTINUATIONS
1 WARNING:DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON
1 WARNING:DEFAULT_NO_BREAK
1 WARNING:CONST_STRUCT
1 WARNING:CONSIDER_COMPLETION
1 ERROR:WHILE_AFTER_BRACE
1 ERROR:ELSE_AFTER_BRACE
1 CHECK:REDUNDANT_CODE
next prev parent reply other threads:[~2017-12-18 6:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 14:42 [PATCH v2 0/5] Support for generalized use of make C={1,2} via a wrapper program Knut Omang
2017-12-16 14:42 ` [PATCH v2 4/5] rds: Add runchecks.cfg for net/rds Knut Omang
2017-12-16 17:45 ` Stephen Hemminger
2017-12-16 18:24 ` Joe Perches
2017-12-16 20:00 ` santosh.shilimkar
[not found] ` <499ec5ae-d1d5-3bb2-8e10-de48283a1c2e-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-12-17 2:02 ` Knut Omang
[not found] ` <1513476136.31439.96.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-12-18 19:28 ` Santosh Shilimkar
2017-12-17 1:57 ` Knut Omang
2017-12-17 1:46 ` Knut Omang
[not found] ` <cover.630ac8faeeda67bf7a778c158174422042942d08.1513430008.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-12-16 17:47 ` [PATCH v2 0/5] Support for generalized use of make C={1,2} via a wrapper program Stephen Hemminger
2017-12-16 18:02 ` Joe Perches
2017-12-17 2:14 ` Knut Omang
2017-12-18 5:00 ` Jason Gunthorpe
2017-12-18 6:00 ` Joe Perches [this message]
2017-12-18 13:05 ` Knut Omang
[not found] ` <1513602315.22938.49.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-12-18 15:30 ` Joe Perches
2017-12-18 16:41 ` Knut Omang
2017-12-18 17:49 ` Jason Gunthorpe
[not found] ` <1513576817.31581.58.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-12-18 17:46 ` Jason Gunthorpe
2017-12-18 17:53 ` Joe Perches
2017-12-18 17:56 ` Bart Van Assche
2017-12-18 18:39 ` Knut Omang
2017-12-18 19:24 ` Leon Romanovsky
[not found] ` <20171218050043.GA1307-uk2M96/98Pc@public.gmane.org>
2017-12-18 13:41 ` Knut Omang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513576817.31581.58.camel@perches.com \
--to=joe@perches.com \
--cc=Julia.Lawall@lip6.fr \
--cc=asmund.ostvold@oracle.com \
--cc=cocci@systeme.lip6.fr \
--cc=corbet@lwn.net \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=john.haxby@oracle.com \
--cc=knut.omang@oracle.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mic@digikod.net \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@oracle.com \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
--cc=willy@infradead.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).