<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/Documentation/CodingStyle, branch v4.1.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-04-18T15:10:49Z</updated>
<entry>
<title>Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6</title>
<updated>2015-04-18T15:10:49Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-04-18T15:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6a24d0640d609138a4e40a4ce9fd9fe7859e24c'/>
<id>urn:sha1:d6a24d0640d609138a4e40a4ce9fd9fe7859e24c</id>
<content type='text'>
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 '-&gt;' when describing access through pointers.
  Documentation: Remove mentioning of block barriers
  Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB
  ...
</content>
</entry>
<entry>
<title>documentation: update CodingStyle on local variables naming in macros</title>
<updated>2015-04-17T13:03:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2015-04-16T19:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2027543b9cb47e1853d8c34fe931e2fcee5cb65'/>
<id>urn:sha1:f2027543b9cb47e1853d8c34fe931e2fcee5cb65</id>
<content type='text'>
Describe proper naming convention for local variables in macros
resembling functions.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation/CodingStyle: improve text layout</title>
<updated>2015-02-27T22:02:02Z</updated>
<author>
<name>Pavel Kretov</name>
<email>firegurafiku@gmail.com</email>
</author>
<published>2015-02-16T17:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=09677e0ff8a115162cfa763b7ad2d753f11fce9f'/>
<id>urn:sha1:09677e0ff8a115162cfa763b7ad2d753f11fce9f</id>
<content type='text'>
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 &lt;firegurafiku@gmail.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation/CodingStyle: fix tab-spaces mixture</title>
<updated>2015-02-27T22:01:40Z</updated>
<author>
<name>Pavel Kretov</name>
<email>firegurafiku@gmail.com</email>
</author>
<published>2015-02-16T17:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=696156f03f97aa3be4ec5f8d85ff3465bbf404fe'/>
<id>urn:sha1:696156f03f97aa3be4ec5f8d85ff3465bbf404fe</id>
<content type='text'>
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 &lt;firegurafiku@gmail.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>CodingStyle: enable emacs display of trailing whitespace</title>
<updated>2015-01-28T19:05:46Z</updated>
<author>
<name>Alison Chaiken</name>
<email>alison_chaiken@mentor.com</email>
</author>
<published>2015-01-26T03:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=039d19a143ee2386f5ab39f9065c987b1d65f91d'/>
<id>urn:sha1:039d19a143ee2386f5ab39f9065c987b1d65f91d</id>
<content type='text'>
Suggest to developers who use emacs that they turn on the
instantaneous trailing-whitespace warning feature.

Signed-off-by: Alison Chaiken &lt;alison_chaiken@mentor.com&gt;
[jc: untabified to match its surroundings]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>CodingStyle: add some more error handling guidelines</title>
<updated>2014-12-02T13:55:32Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-12-02T08:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea04036032edda6f771c1381d03832d2ed0f6c31'/>
<id>urn:sha1:ea04036032edda6f771c1381d03832d2ed0f6c31</id>
<content type='text'>
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 &lt;dan.carpenter@oracle.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
[jc: added GFP_KERNEL to kmalloc() call]
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>CodingStyle: Add a chapter on conditional compilation</title>
<updated>2014-11-03T16:46:02Z</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2014-10-29T18:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21228a1868692c34ade648dbb0bc3db0069ab551'/>
<id>urn:sha1:21228a1868692c34ade648dbb0bc3db0069ab551</id>
<content type='text'>
Document several common practices and conventions regarding conditional
compilation, most notably the preference for ifdefs in headers rather
than .c files.

Signed-off-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>CodingStyle: fix a minor typo</title>
<updated>2014-08-26T07:35:54Z</updated>
<author>
<name>Raymond L. Rivera</name>
<email>ray.l.rivera@gmail.com</email>
</author>
<published>2014-07-24T09:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7c18fd786de3dabc43e0f412dd63080c14fe6e1b'/>
<id>urn:sha1:7c18fd786de3dabc43e0f412dd63080c14fe6e1b</id>
<content type='text'>
There was a minor typo in the CodingStyle document where the word 'section'
had been spelled as 'secton'.

Signed-off-by: Raymond L. Rivera &lt;ray.l.rivera@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Documentation: expand/clarify debug documentation</title>
<updated>2014-06-04T23:54:17Z</updated>
<author>
<name>Dan Streetman</name>
<email>ddstreet@ieee.org</email>
</author>
<published>2014-06-04T23:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e099f557d9c6797c3ee3ee7b5c8cebe543ec1cc'/>
<id>urn:sha1:6e099f557d9c6797c3ee3ee7b5c8cebe543ec1cc</id>
<content type='text'>
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 &lt;ddstreet@ieee.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation/CodingStyle: allow multiple return statements per function</title>
<updated>2013-07-03T23:08:01Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-07-03T22:08:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b57a0505e750b3d7b2d39e9823b276d8ca1a08fe'/>
<id>urn:sha1:b57a0505e750b3d7b2d39e9823b276d8ca1a08fe</id>
<content type='text'>
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 &lt;dan.carpenter@oracle.com&gt;
Cc: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
