All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] CODING_STYLE: Mention preferred comment form
@ 2017-02-03 17:58 ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2017-02-03 17:58 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: patches, Thomas Huth

Our defacto coding style strongly prefers /* */ style comments
over the single-line // style, and checkpatch enforces this,
but we don't actually document this. Mention it in CODING_STYLE.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 CODING_STYLE | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CODING_STYLE b/CODING_STYLE
index f53180b..2fa0c0b 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -116,3 +116,10 @@ if (a == 1) {
 Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read.
 Besides, good compilers already warn users when '==' is mis-typed as '=',
 even when the constant is on the right.
+
+7. Comment style
+
+We use traditional C-style /* */ comments and avoid // comments.
+
+Rationale: The // form is valid in C99, so this is purely a matter of
+consistency of style. The checkpatch script will warn you about this.
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-02-15 10:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 17:58 [Qemu-trivial] [PATCH] CODING_STYLE: Mention preferred comment form Peter Maydell
2017-02-03 17:58 ` [Qemu-devel] " Peter Maydell
2017-02-04 10:00 ` [Qemu-trivial] " Markus Armbruster
2017-02-04 10:00   ` Markus Armbruster
2017-02-04 14:48 ` [Qemu-trivial] " Fam Zheng
2017-02-04 14:48   ` Fam Zheng
2017-02-05 18:02 ` [Qemu-trivial] " Laurent Vivier
2017-02-05 18:02   ` [Qemu-devel] " Laurent Vivier
2017-02-13 14:00 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
2017-02-13 14:00   ` Stefan Hajnoczi
2017-02-15 10:17 ` [Qemu-trivial] " Michael Tokarev
2017-02-15 10:17   ` [Qemu-devel] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.