Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61479
b: refs/heads/master
c: 7209a1d
h: refs/heads/master
i:
  61477: 20893f2
  61475: 39f22f9
  61471: c2f48c1
v: v3
  • Loading branch information
Linus Torvalds committed Jul 19, 2007
1 parent eacbbc7 commit a6af454
Show file tree
Hide file tree
Showing 88 changed files with 3,025 additions and 1,671 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ede178e216b5dd9200cf2c483c746e0672fbe503
refs/heads/master: 7209a1dc2557b127ee75a49e200812366532510d
20 changes: 18 additions & 2 deletions trunk/Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,27 @@ covers RTL which is used frequently with assembly language in the kernel.

Kernel developers like to be seen as literate. Do mind the spelling
of kernel messages to make a good impression. Do not use crippled
words like "dont" and use "do not" or "don't" instead.
words like "dont"; use "do not" or "don't" instead. Make the messages
concise, clear, and unambiguous.

Kernel messages do not have to be terminated with a period.

Printing numbers in parentheses (%d) adds no value and should be avoided.

There are a number of driver model diagnostic macros in <linux/device.h>
which you should use to make sure messages are matched to the right device
and driver, and are tagged with the right level: dev_err(), dev_warn(),
dev_info(), and so forth. For messages that aren't associated with a
particular device, <linux/kernel.h> defines pr_debug() and pr_info().

Coming up with good debugging messages can be quite a challenge; and once
you have them, they can be a huge help for remote troubleshooting. Such
messages should be compiled out when the DEBUG symbol is not defined (that
is, by default they are not included). When you use dev_dbg() or pr_debug(),
that's automatic. Many subsystems have Kconfig options to turn on -DDEBUG.
A related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to the
ones already enabled by DEBUG.


Chapter 14: Allocating memory

Expand Down Expand Up @@ -790,4 +805,5 @@ Kernel CodingStyle, by greg@kroah.com at OLS 2002:
http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/

--
Last updated on 2006-December-06.
Last updated on 2007-July-13.

4 changes: 4 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ X!Edrivers/pnp/system.c
!Edrivers/pnp/manager.c
!Edrivers/pnp/support.c
</sect1>
<sect1><title>Userspace IO devices</title>
!Edrivers/uio/uio.c
!Iinclude/linux/uio_driver.h
</sect1>
</chapter>

<chapter id="blkdev">
Expand Down
Loading

0 comments on commit a6af454

Please sign in to comment.