24 Oct, 2016

2 commits


22 Sep, 2016

1 commit


21 Sep, 2016

5 commits


15 Aug, 2016

2 commits

  • Because Linus may still be reading source code on greenbar paper
    instead of color terminals with code syntax highlighting and
    appropriate font decorations.

    Link: http://lkml.kernel.org/r/CA+55aFyQYJerovMsSoSKS7PessZBr4vNp-3QUUwhqk4A4_jcbg@mail.gmail.com

    Signed-off-by: Joe Perches

    Joe Perches
     
  • Chapter 7 (Centralized exiting of functions) of the coding style
    documentation is unclear at times, and lacks some information (such
    as the possibility to indent labels with a single space.) Clarify and
    complete it.

    Signed-off-by: Jean Delvare
    Cc: Markus Elfring
    Cc: Jonathan Corbet
    Signed-off-by: Jonathan Corbet

    Jean Delvare
     

21 Jul, 2016

1 commit

  • Now that the new Sphinx world order is taking over, the information in
    kernel-doc-nano-HOWTO.txt is outmoded. I hate to remove it altogether,
    since it's one of those files that people expect to find. But we can add a
    warning and fix all the other pointers to it.

    Reminded-by: Daniel Vetter
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

26 Jan, 2016

1 commit


12 Jan, 2016

1 commit


11 Jul, 2015

1 commit


08 May, 2015

1 commit


18 Apr, 2015

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "Numerous fixes, the overdue removal of the i2o docs, some new Chinese
    translations, and, hopefully, the README fix that will end the flow of
    identical patches to that file"

    * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (34 commits)
    Documentation/memcg: update memcg/kmem status
    Documentation: blackfin: Makefile: Typo building issue
    Documentation/vm/pagemap.txt: correct location of page-types tool
    Documentation/memory-barriers.txt: typo fix
    doc: Add guest_nice column to example output of `cat /proc/stat'
    Documentation/kernel-parameters: Move "eagerfpu" to its right place
    Documentation: gpio: Update ACPI part of the document to mention _DSD
    docs/completion.txt: Various tweaks and corrections
    doc: completion: context, scope and language fixes
    Documentation:Update Documentation/zh_CN/arm64/memory.txt
    Documentation:Update Documentation/zh_CN/arm64/booting.txt
    Documentation: Chinese translation of arm64/legacy_instructions.txt
    DocBook media: fix broken EIA hyperlink
    Documentation: tweak the maintainers entry
    README: Change gzip/bzip2 to xz compression format
    README: Update version number reference
    doc:pci: Fix typo in Documentation/PCI
    Documentation: drm: Use '->' when describing access through pointers.
    Documentation: Remove mentioning of block barriers
    Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB
    ...

    Linus Torvalds
     

17 Apr, 2015

1 commit


28 Feb, 2015

2 commits

  • Try to make coding style documentation look a bit more readable and
    consistent with the following:

    - indent every code example in C to first tab-stop;
    - surround every code example with empty lines, both top and bottom;
    - remove empty lines where text looked way too spare;
    - do not indent examples in elisp and kconfig;
    - do not do any non-whitespace changes.

    Signed-off-by: Pavel Kretov
    Signed-off-by: Jonathan Corbet

    Pavel Kretov
     
  • Coding style description has a irregular mixture of tabs and spaces in two
    places which is bad by any means and can possibly hurt somebody's sense
    of beauty.

    Signed-off-by: Pavel Kretov
    Signed-off-by: Jonathan Corbet

    Pavel Kretov
     

29 Jan, 2015

1 commit


02 Dec, 2014

1 commit

  • I added a paragraph on choosing label names, and updated the example
    code to use a better label name. I also cleaned up the example code to
    more modern style by moving the allocation out of the initializer and
    changing the NULL check.

    Perhaps the most common type of error handling bug in the kernel is "one
    err bugs". CodingStyle already says that we should "avoid nesting" by
    using error labels and one err style error handling tends to have
    multiple indent levels, so this was already bad style. But I've added a
    new paragraph explaining how to avoid one err bugs by using multiple
    error labels which is, hopefully, more clear.

    Signed-off-by: Dan Carpenter
    Acked-by: Julia Lawall
    [jc: added GFP_KERNEL to kmalloc() call]
    Signed-off-by: Jonathan Corbet

    Dan Carpenter
     

04 Nov, 2014

1 commit


26 Aug, 2014

1 commit


05 Jun, 2014

1 commit

  • The pr_debug() and related debug print macros all differ from the normal
    pr_XXX() macros, in that the normal ones print unconditionally, while
    the debug macros are compiled out unless DEBUG is defined or
    CONFIG_DYNAMIC_DEBUG is set. This isn't obvious, and the only way to
    find this out is either to review the actual printk.h code or to read
    CodingStyle, and the message there doesn't highlight the fact.

    Change Documentation/CodingStyle to clearly indicate that pr_debug() and
    related debug printing macros behave differently than all other pr_XXX()
    macros, and attempt to clarify when and where the different debug
    printing methods might be used.

    Add short comment to printk.h above the pr_XXX() macros indicating that
    while these macros print unconditionally, pr_debug() does not.

    Signed-off-by: Dan Streetman
    Cc: Joe Perches
    Cc: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Streetman
     

04 Jul, 2013

1 commit

  • A surprising number of newbies interpret this section to mean that only
    one return statement is allowed per function. Part of the problem is that
    the "one return statement per function" rule is an actual style guideline
    that people are used to from other projects.

    Signed-off-by: Dan Carpenter
    Cc: Eduardo Valentin
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

12 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Rob Landley
    CC: Jiri Kosina
    CC: Masanari Iida
    CC: Jason Wessel
    CC: Richard L Maliszewski
    CC: Gang Wei
    CC: Shane Wang
    CC: Harry Wei
    Signed-off-by: Kees Cook
    Acked-by: Jason Wessel

    Kees Cook
     

06 Oct, 2012

1 commit


01 Jun, 2012

1 commit


31 Mar, 2012

1 commit


05 Nov, 2011

1 commit

  • After commit 38829dc9d7b4 ("Documentation/CodingStyle: flesh out if-else
    examples") highlight that if _only_one_ branch of a conditional
    statement is a single statement, then braces are to be used on both
    branches.

    Signed-off-by: Antonio Ospite
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     

07 Aug, 2011

1 commit


07 Jul, 2011

1 commit


23 Mar, 2011

1 commit

  • There is a missing case for "Chapter 3: Placing Braces and Spaces". We
    often know we should not use braces where a single statement. The first
    case is:

    if (condition)
    action();

    Another case is:

    if (condition)
    do_this();
    else
    do_that();

    However, I can not find a description of the second case.

    Signed-off-by: Harry Wei
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harry Wei
     

17 Mar, 2011

1 commit


13 Jun, 2009

1 commit


30 Jan, 2009

2 commits

  • I don't think emacs understands tilde expansion, so use
    "expand-file-name" to do that.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • With the previous Emacs tips example the kernel style was made available
    for files in the kernel-tree only. This patch updates the tip to add a
    separate cc-mode indent style ("linux-tabs-only"). This makes it easy to
    switch between different indent styles and also makes the kernel style
    easily available for any filetype mode (c++, awk, ...) that is managed
    by the Emacs cc-mode.

    Signed-off-by: Teemu Likonen
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Teemu Likonen
     

26 Jul, 2008

1 commit


17 Oct, 2007

1 commit

  • I would suggest this change to make CodingStyle properly reflect the style
    used by the kernel, rather than the current wording which is wishful
    thinking and misleading, and comes from the same school of thought that
    gets off on prescriptive grammar, latin and comp.std.c

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

19 Jul, 2007

1 commit

  • Update CodingStyle to talk about "-DDEBUG" message conventions and the
    new "-DVERBOSE_DEBUG" convention.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    David Brownell