From patchwork Fri Jan 13 20:29:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 6201 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 791D723E13 for ; Fri, 13 Jan 2012 20:29:57 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 6387DA18094 for ; Fri, 13 Jan 2012 20:29:57 +0000 (UTC) Received: by bkbzu5 with SMTP id zu5so3259674bkb.11 for ; Fri, 13 Jan 2012 12:29:57 -0800 (PST) Received: by 10.205.26.67 with SMTP id rl3mr1085533bkb.45.1326486597129; Fri, 13 Jan 2012 12:29:57 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs38625bkc; Fri, 13 Jan 2012 12:29:56 -0800 (PST) Received: by 10.180.83.72 with SMTP id o8mr2489129wiy.22.1326486595693; Fri, 13 Jan 2012 12:29:55 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id eo3si6025966wbb.124.2012.01.13.12.29.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jan 2012 12:29:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Rlnkz-0003DF-3G; Fri, 13 Jan 2012 20:29:49 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori Subject: [RFC] CODING_STYLE: Clarify style for enum and function type names Date: Fri, 13 Jan 2012 20:29:49 +0000 Message-Id: <1326486589-12326-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Clarify that enum type names and function type names should follow the CamelCase style used for structured type names. Signed-off-by: Peter Maydell --- During a conversation on IRC with Anthony, I realised that the coding standard isn't entirely clear about what convention should be followed for enum and function types. This patch resolves that by saying they should be CamelCase like structured type names, based on Anthony's suggestion. I've tagged this as an RFC in case anybody would rather we went the other way instead... CODING_STYLE | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/CODING_STYLE b/CODING_STYLE index 6e61c49..7c82d4d 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -44,7 +44,8 @@ Rationale: 3. Naming Variables are lower_case_with_underscores; easy to type and read. Structured -type names are in CamelCase; harder to type but standing out. Scalar type +type names are in CamelCase; harder to type but standing out. Enum type +names and function type names should also be in CamelCase. Scalar type names are lower_case_with_underscores_ending_with_a_t, like the POSIX uint64_t and family. Note that this last convention contradicts POSIX and is therefore likely to be changed.