[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/43] CODING_STYLE: Define our preferred form for mu
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 15/43] CODING_STYLE: Define our preferred form for multiline comments |
Date: |
Fri, 15 Jun 2018 15:24:53 +0100 |
The codebase has a bit of a mix of different multiline
comment styles. State a preference for the Linux kernel
style:
/*
* Star on the left for each line.
* Leading slash-star and trailing star-slash
* each go on a line of their own.
*/
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Alex Williamson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
---
CODING_STYLE | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/CODING_STYLE b/CODING_STYLE
index 12ba58ee293..ec075dedc4a 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -124,6 +124,23 @@ 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.
+Multiline comment blocks should have a row of stars on the left,
+and the initial /* and terminating */ both on their own lines:
+ /*
+ * like
+ * this
+ */
+This is the same format required by the Linux kernel coding style.
+
+(Some of the existing comments in the codebase use the GNU Coding
+Standards form which does not have stars on the left, or other
+variations; avoid these when writing new comments, but don't worry
+about converting to the preferred form unless you're editing that
+comment anyway.)
+
+Rationale: Consistency, and ease of visually picking out a multiline
+comment from the surrounding code.
+
8. trace-events style
8.1 0x prefix
--
2.17.1
- [Qemu-devel] [PULL 00/43] target-arm queue, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 10/43] hw/arm/armv7m: Remove unused armv7m_init() function, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 11/43] arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 13/43] cpu-defs.h: Document CPUIOTLBEntry 'addr' field, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 08/43] hw/char/parallel: Convert away from old_mmio, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 07/43] hw/input/pckbd: Convert away from old_mmio, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 05/43] hw/block/pflash_cfi02: Convert away from old_mmio, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 17/43] exec.c: Don't accidentally sign-extend 4-byte loads in subpage_read(), Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 16/43] bswap: Add new stn_*_p() and ldn_*_p() memory access functions, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 04/43] hw/m68k/mcf5206: Convert away from old_mmio, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 15/43] CODING_STYLE: Define our preferred form for multiline comments,
Peter Maydell <=
- [Qemu-devel] [PULL 09/43] stellaris: Stop using armv7m_init(), Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 23/43] target/arm: Implement SVE compress active elements, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 06/43] hw/watchdog/wdt_i6300esb: Convert away from old_mmio, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 12/43] hw/core/or-irq: Support more than 16 inputs to an OR gate, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 01/43] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 14/43] cputlb: Pass cpu_transaction_failed() the correct physaddr, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 21/43] target/arm: Implement SVE Permute - Predicates Group, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 18/43] exec.c: Use stn_p() and ldn_p() instead of explicit switches, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 19/43] target/arm: Extend vec_reg_offset to larger sizes, Peter Maydell, 2018/06/15
- [Qemu-devel] [PULL 03/43] hw/sh/sh7750: Convert away from old_mmio, Peter Maydell, 2018/06/15