No subject


Fri Jan 23 11:48:37 CET 2009


checkpatch.  Maybe we can require 0 _errors_?

Moreover, it's only recently that I saw checkpatch warning about lines
that are not even changed in a patch but are only in the context, as for
exmaple here:

  WARNING: unnecessary whitespace before a quoted newline
  #293: FILE: net/net.c:1604:
   				debug("Got ICMP ECHO REQUEST, return %d bytes \n",
  
Now when this is "fixed", the new patch will then contain a cosmetic
change only intermixed with the "real" changes.  Personally I think this
is problematic and contrary to the intention of checking a _patch_, but
it's the way it is.

I think we all agree that we should make reviews as easy as possible.
In order for that, we need to separate cosmetic from functional changes.
Otherwise in large patches it is very difficult to find the meat of a
patch.  Only recently this exact problem made Andy Fleming resplit a
large commit[2] into functional and cosmetic[3] changes (ironically the
cosmetic changes were added as a followup to my request of fixing
checkpatch problems).  As much as this is appreciated, it is clear that
it takes some effort to do.  Ideally we should prevent such work right
from the start.

So what exact wording should we use in our CodingStyle to prevent such
problems, or should we even start our own version of checkpatch tailored
to our project?

As a base for discussion, what about this:

  Use common sense in interpreting the results of checkpatch. Warnings
  that clearly only make sense in the Linux kernel can be ignored.  Also
  warnings produced for _context lines_ rather than actual changes can
  also be ignored.

Thanks
  Detlev  

[1] http://www.denx.de/wiki/view/U-Boot/CodingStyle
[2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/97068
[3] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/97129

-- 
config LGUEST
        If unsure, say N.  If curious, say M.  If masochistic, say Y.
                                     -- linux/drivers/lguest/Kconfig
--
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