From patchwork Mon Jun 4 16:21:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 137658 Delivered-To: patches@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1720284lji; Mon, 4 Jun 2018 09:21:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLlNOaPRxVXDLg//hbbIZQjOJJ80/HbTqFizQnK93T+XraSF56zusafj+BYWj+quDGsqJQp X-Received: by 2002:adf:f40a:: with SMTP id g10-v6mr16501790wro.256.1528129302674; Mon, 04 Jun 2018 09:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528129302; cv=none; d=google.com; s=arc-20160816; b=yCWRTWRVvbQwE7/IDpgm7HJ9jecaqwKYkefEkUQEssWyUk3oOpoGQF8VA5UJEPrOQa 3MQ3sQetSIwMiLEOl5b+lZs3otJa4yaX0XV7+nYd/thlD76ScxM4KrFCQpTC93jaqDEV qaaiuy5Ta3ldA5uG+R++uZd/wSvitABrz9VhKoZ6J0fPs4jrss58sN+Vk3S+zD8nfhvX px/HaDCJNBgBon8RAn+sRPl5pf1aiyBB0KjQIjmMakah5YY2c0gWueYn/hG5YsISkmjD ZfjNb0uWyoSq8vwDWioGLO+ss9eCK03/puyANShhynModOOWIidE3kQ2oWpJl2zTqlVC g2pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=QwVxsrKOY7okKaYEKUXtngd8ZqhKJOBmrrSWKJTQ+zo=; b=QhX1xYzNqgxrXdGGbIgRsEw7uD3cSMsnOzADYC4wIUU8NtduX49A0PNbUpRCmu09kX Xx2F5Xq6u5dzRzKlpHDLcbYzuKhCJ7WjlxUbndMFwqtpfu1aRnmh6JE+XELDI5KogbLs c1vGPxxcjFyUnIG4s6jkMwDtboVQLfqj7FFtRg2Oxuv0onYJ3mboMyRAYoYwP6zeJc+2 OUZNCeuiok4GItq0lIfU8zipPMl1dbAqT3sGJRTsfzzcbwGM+hXH1cxKNhfG0wvb5Q/6 N597LKNvEQkcBhZ0cvrk6Wy8mW3i6ZYhPH1IEkICdjn18uphHxVGvUUbWfpQc8AwjbKA LXdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id l141-v6si405431wmd.102.2018.06.04.09.21.42 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 09:21:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fPsEn-0007BA-PJ; Mon, 04 Jun 2018 17:21:41 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Richard Henderson , qemu-trivial@nongnu.org Subject: [PATCH] CODING_STYLE: Define our preferred form for multiline comments Date: Mon, 4 Jun 2018 17:21:40 +0100 Message-Id: <20180604162140.20688-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.1 The codebase has a bit of a mix of /* multiline comments * like this */ and /* multiline comments like this in the GNU Coding Standards style */ State a preference for the former. Signed-off-by: Peter Maydell --- I admit that to some extent I'm imposing my aesthetic preferences here; pretty sure we have a lot more style 1 comments than style 2, though. --- CODING_STYLE | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/CODING_STYLE b/CODING_STYLE index 12ba58ee293..fb1d1f1cd62 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -124,6 +124,19 @@ 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 comments blocks should have a row of stars on the left +and the terminating */ on its own line: + /* like + * this + */ +Putting the initial /* on its own line is accepted, but not required. +(Some of the existing comments in the codebase use the GNU Coding +Standards form which does not have stars on the left; avoid this +when writing new comments.) + +Rationale: Consistency, and ease of visually picking out a multiline +comment from the surrounding code. + 8. trace-events style 8.1 0x prefix