summaryrefslogtreecommitdiffstats
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorPeter Maydell2016-08-10 16:59:08 +0200
committerPeter Maydell2016-08-10 16:59:08 +0200
commit4b3e5c06a15298d870e81c2d3a5a16dc2a93f5cc (patch)
tree7b52e327678a89a0baf99ef2405deb67bf4a2df0 /CODING_STYLE
parentMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160810' into... (diff)
parentcheckpatch: default to success if only warnings (diff)
downloadqemu-4b3e5c06a15298d870e81c2d3a5a16dc2a93f5cc.tar.gz
qemu-4b3e5c06a15298d870e81c2d3a5a16dc2a93f5cc.tar.xz
qemu-4b3e5c06a15298d870e81c2d3a5a16dc2a93f5cc.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* pc-bios/optionrom/Makefile fixes * warning fixes for __atomic_load and -1 << x in clang * missed interrupt fix from Gonglei * checkpatch fix from Radim and myself # gpg: Signature made Wed 10 Aug 2016 14:54:31 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: checkpatch: default to success if only warnings checkpatch: bump most warnings to errors CODING_STYLE, checkpatch: update line length rules checkpatch: check for CVS keywords on all sources checkpatch: tweak the files in which TABs are checked timer: set vm_clock disabled default checkpatch: ignore automatically imported Linux headers clang: Fix warning reg. expansion to 'defined' Disable warn about left shifts of negative values atomic: strip "const" from variables declared with typeof optionrom: fix compilation with mingw docker target optionrom: add -fno-stack-protector build-sys: fix building with make CFLAGS=.. argument linuxboot_dma: avoid guest ABI breakage on gcc vs. clang compilation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'CODING_STYLE')
-rw-r--r--CODING_STYLE8
1 files changed, 7 insertions, 1 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index 3c6978f836..e7fde15003 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -31,7 +31,11 @@ Do not leave whitespace dangling off the ends of lines.
2. Line width
-Lines are 80 characters; not longer.
+Lines should be 80 characters; try not to make them longer.
+
+Sometimes it is hard to do, especially when dealing with QEMU subsystems
+that use long function or symbol names. Even in that case, do not make
+lines much longer than 80 characters.
Rationale:
- Some people like to tile their 24" screens with a 6x4 matrix of 80x24
@@ -39,6 +43,8 @@ Rationale:
let them keep doing it.
- Code and especially patches is much more readable if limited to a sane
line length. Eighty is traditional.
+ - The four-space indentation makes the most common excuse ("But look
+ at all that white space on the left!") moot.
- It is the QEMU coding style.
3. Naming