From nobody Sun Apr 28 13:18:41 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1497292592052711.3894001606865; Mon, 12 Jun 2017 11:36:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 001A821AE30F0; Mon, 12 Jun 2017 11:35:14 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6C60321AE30D0 for ; Mon, 12 Jun 2017 11:35:13 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 12 Jun 2017 11:36:27 -0700 Received: from mdkinney-mobl.amr.corp.intel.com ([10.241.98.52]) by fmsmga004.fm.intel.com with ESMTP; 12 Jun 2017 11:36:26 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,334,1493708400"; d="scan'208";a="273290867" From: Michael Kinney To: edk2-devel@lists.01.org Date: Mon, 12 Jun 2017 11:36:21 -0700 Message-Id: <1497292581-47804-2-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1497292581-47804-1-git-send-email-michael.d.kinney@intel.com> References: <1497292581-47804-1-git-send-email-michael.d.kinney@intel.com> Subject: [edk2] [edk2-CCodingStandardsSpecification PATCH] Clarify format of multi-line function calls X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin W Shaw , Laszlo Ersek , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D425 Cc: Laszlo Ersek Cc: Liming Gao Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Kinney --- 5_source_files/52_spacing.md | 15 ++++------ README.md | 69 ++++++++++++++++++++++------------------= ---- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/5_source_files/52_spacing.md b/5_source_files/52_spacing.md index 01f79b4..677aa41 100644 --- a/5_source_files/52_spacing.md +++ b/5_source_files/52_spacing.md @@ -130,11 +130,13 @@ if (MyVar !=3D 0) { If ((--MyInteger) > 0) { ``` =20 -#### 5.2.2.4 Subsequent lines of multi-line function calls should line up = one or two tabstops from the beginning of the function name +#### 5.2.2.4 Subsequent lines of multi-line function calls should line up = two spaces from the beginning of the function name =20 -Use either one or two tab stops to ensure that each parameter is indented = at -least two spaces after the function name. Either of the below examples is -acceptable: +If a function call is broken up into multiple lines, then: + +* One function call argument per line +* Indent each argument 2 spaces from the start of the function name +* Align the close parenthesis with the start of the last argument =20 ```c Status =3D gBS->AllocatePool ( @@ -142,11 +144,6 @@ Status =3D gBS->AllocatePool ( sizeof (DRIVER_NAME_INSTANCE), &PrivateData ); -Status =3D gBS->AllocatePool ( - EfiBootServicesData, - sizeof (DRIVER_NAME_INSTANCE), - &PrivateData - ); ``` =20 #### 5.2.2.5 Always put space after commas or semicolons that separate ite= ms diff --git a/README.md b/README.md index fb5fb0a..8b9675b 100644 --- a/README.md +++ b/README.md @@ -77,37 +77,38 @@ Copyright (c) 2006-2017, Intel Corporation. All rights = reserved. =20 ### Revision History =20 -| Revision | Revision History = | Date | -| ---------- | -----------------------------------------------------------= ----------------------------------------- | ---------- | -| 0.0.1 | First swag. = | 6/23/00 | -| 0.0.2 | Included feedback from team. = | 8/3/00 | -| 0.3 | Add comments. = | 8/10/00 | -| 0.3001 | Pre-vacation update, need to sync with new numbering proces= s. | 9/11/00 | -| 0.31 | Incorporated Sync 1 learnings. = | 12/12/00 | -| 0.32 | Completed TAT ARs. = | 6/8/01 | -| 0.33 | Added goto rules. = | 8/16/01 | -| 0.34 | Updated to match driver and Runtime Lib. = | 11/15/01 | -| 0.9 | Updated to Intel(R) Platform Innovation Framework for EFI. = Added checklist appendix. | 1/8/04 | -| 0.91 | Completed editing and formatting pass. = | 3/3/04 | -| 0.92 | Updated the structure declaration rules: Added section 4.8 = and modified the checklist in Appendix A. | 4/8/04 | -| 0.93 | Added some minor clarifications in section 3.1, 4.5, 7.1, a= nd 10. | 9/14/04 | -| 0.94 | Revised to accommodate Doxygen style commenting standards = | 3/1/06 | -| 0.50 | Change to new numbering scheme. Incorporate Review Comments= . Editing and formatting. | 4/21/06 | -| 0.51 | Changed to EDK II. = | 7/13/06 | -| 0.52 | Update rules to clarify areas of misinterpretation. Add cop= yright formatting rules. | 2/09/2010 | -| 0.60 | Re-organize document and update to current rules. = | 2/15/2010 | -| 0.70 | Release for Review = | 3/1/2010 | -| 0.95 | Review comments incorporated, Release to Tech Pubs for Fina= lization | 3/10/2010 | -| 1.00 | First full release = | 3/15/2010 | -| 1.01 | Restructure into book format. = | 12/08/2011 | -| 1.02 | Incorporate suggestions and trackers = | 3/19/2012 | -| | Release For Review = | 4/2/2012 | -| | Release = | 4/16/2012 | -| 1.03 | Update and incorporate requests and bug fixes. Remove "Inte= l Confidential" classification. | 9/11/2014 | -| 1.50 | Release for Review = | 9/26/2014 | -| 1.80 | Incorporate US Review Comments = | 10/10/2014 | -| 1.85 | Incorporate PRC Review Comments = | 10/24/2014 | -| | Release for Extended US & PRC Review = | 10/28/2014 | -| 2.0 | Release = | 11/14/2014 | -| 2.1 | DRAFT for REFORMAT = | 10/30/2015 | -| 2.2 | Convert to Gitbook = | April 2017 | +| Revision | Revision History = = | Date | +| -------- | -------------------------------------------------------------= ---------------------------------------------------------------------------= --------- | ---------- | +| 0.0.1 | First swag. = = | 6/23/00 | +| 0.0.2 | Included feedback from team. = = | 8/3/00 | +| 0.3 | Add comments. = = | 8/10/00 | +| 0.3001 | Pre-vacation update, need to sync with new numbering process.= = | 9/11/00 | +| 0.31 | Incorporated Sync 1 learnings. = = | 12/12/00 | +| 0.32 | Completed TAT ARs. = = | 6/8/01 | +| 0.33 | Added goto rules. = = | 8/16/01 | +| 0.34 | Updated to match driver and Runtime Lib. = = | 11/15/01 | +| 0.9 | Updated to Intel(R) Platform Innovation Framework for EFI. Ad= ded checklist appendix. = | 1/8/04 | +| 0.91 | Completed editing and formatting pass. = = | 3/3/04 | +| 0.92 | Updated the structure declaration rules: Added section 4.8 an= d modified the checklist in Appendix A. = | 4/8/04 | +| 0.93 | Added some minor clarifications in section 3.1, 4.5, 7.1, and= 10. = | 9/14/04 | +| 0.94 | Revised to accommodate Doxygen style commenting standards = = | 3/1/06 | +| 0.50 | Change to new numbering scheme. Incorporate Review Comments. = Editing and formatting. = | 4/21/06 | +| 0.51 | Changed to EDK II. = = | 7/13/06 | +| 0.52 | Update rules to clarify areas of misinterpretation. Add copyr= ight formatting rules. = | 2/09/2010 | +| 0.60 | Re-organize document and update to current rules. = = | 2/15/2010 | +| 0.70 | Release for Review = = | 3/1/2010 | +| 0.95 | Review comments incorporated, Release to Tech Pubs for Finali= zation = | 3/10/2010 | +| 1.00 | First full release = = | 3/15/2010 | +| 1.01 | Restructure into book format. = = | 12/08/2011 | +| 1.02 | Incorporate suggestions and trackers = = | 3/19/2012 | +| | Release For Review = = | 4/2/2012 | +| | Release = = | 4/16/2012 | +| 1.03 | Update and incorporate requests and bug fixes. Remove "Intel = Confidential" classification. = | 9/11/2014 | +| 1.50 | Release for Review = = | 9/26/2014 | +| 1.80 | Incorporate US Review Comments = = | 10/10/2014 | +| 1.85 | Incorporate PRC Review Comments = = | 10/24/2014 | +| | Release for Extended US & PRC Review = = | 10/28/2014 | +| 2.0 | Release = = | 11/14/2014 | +| 2.1 | DRAFT for REFORMAT = = | 10/30/2015 | +| 2.2 | Convert to Gitbook = = | June 2017 | +| | [#425](https://bugzilla.tianocore.org/show_bug.cgi?id=3D425) = [CCS] clarify line breaking and indentation requirements for multi-line fun= ction calls | | --=20 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel