[U-Boot] Policy for checkpatch usage?

Detlev Zundel dzu at denx.de
Thu Apr 21 16:29:17 CEST 2011


Hi Scott,

> I vote for "checkpatch is a tool that can help you find some style problems,
> but is imperfect, and the things it complains about are of varying
> importance".  If you insist on zero warnings, what's the difference between
> a warning and an error?  And will there then be a U-Boot-specific coding
> style document to match?  Will anyone that wants to submit a patch that
> checkpatch erroneously complains about have to first submit a patch for
> checkpatch (first learning Perl if need be)?

So you would agree to this text:

  Checkpatch is a tool that can help you find some style problems, but is
  imperfect, and the things it complains about are of varying importance.
  So use common sense in interpreting the results.  Warnings that clearly
  only make sense in the Linux kernel can be ignored.  
  
What about the problem with checkpatch errors in current code, i.e. the
origin of this sentence:

  Also warnings produced for context lines (i.e. existing code) rather
  than actual changes can also be ignored.

Do we want this?

> There's a lot more "common sense" that needs to be applied when writing
> software than where to stick what kind and amount of whitespace.
> Guidelines are good -- zero-tolerance obedience to a script, not so much.

I agree 100%, but I also understand that people want to see some
guideline that they can refer to.  So let's see how good a compromise we
can find.

Thanks
  Detlev

-- 
Some people unfortunately like  jumping up and down about spaces but not code.
[...]   I'd rather read good poetry written in very bad hand writing than bad
poetry written in beautiful handwriting, and I think the same is true of code.
           -- Alan Cox <20090701130018.115ce0ea at lxorguk.ukuu.org.uk>
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list