From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 795897803CC for ; Fri, 11 Oct 2024 16:47:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dz+H5yl1gCtypDhvpX3/0N+9FoXHkop5itCTDDpXfOY=; c=relaxed/simple; d=groups.io; h=Feedback-ID:Message-ID:Date:MIME-Version:User-Agent:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1728665246; v=1; x=1728924444; b=GiCbvm+ItnGNkAn9ZLvEhgZPDDdW5CxLWEEkljERZlfXAm2p/+MX4z4quzWjt/MA3v426awi VrHr4rACpvhJudvJx6i4wRXXKjTXIyhqjP+eJC3AAsmWoysjyfPLLHHr2HpMtyUCmPwJdBJRcoJ XiXBehl6fiJZGPUmJAUaGFiwNlDHejoIqcQ6xqiOfBukI2TcVxNTYwvX/s0GhkNzX9VjUmfB4Jd 6IyHXRvZ6MRT3LOX6koWLNcdvRFHBctFPAj+PfWMaflnq2BiYyU4WpR/G1wpQ4ZiR0qYtgVKKhC saf3TxWtvgxYqayC0q3PIL7Esy/r8A9CywhTFW7XHylgQ== X-Received: by 127.0.0.2 with SMTP id v4RHYY7687511xGhgKT2gENc; Fri, 11 Oct 2024 09:47:24 -0700 X-Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) by mx.groups.io with SMTP id smtpd.web10.16976.1728665244101058877 for ; Fri, 11 Oct 2024 09:47:24 -0700 X-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 43906138028E; Fri, 11 Oct 2024 12:47:23 -0400 (EDT) X-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 11 Oct 2024 12:47:23 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefkedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeftvggsvggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhord gtohhmqeenucggtffrrghtthgvrhhnpefgjeegtdegheektddtgeffhfdvheeiveekkefh heeihfekfeeitdfgleejtedufeenucffohhmrghinhepthhirghnohgtohhrvgdrohhrgh dpghhrohhuphhsrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehrvggsvggttggrsegsshguihhordgtohhmpdhnsggprhgtphhtthhope egpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsphgsrhhoghgrnhesohhuthhl ohhokhdrtghomhdprhgtphhtthhopeguvghvvghlsegvughkvddrghhrohhuphhsrdhioh dprhgtphhtthhopehmihgthhgrvghlrdgurdhkihhnnhgvhiesihhnthgvlhdrtghomhdp rhgtphhtthhopehoshguvgeslhhinhhugidrmhhitghrohhsohhfthdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Oct 2024 12:47:22 -0400 (EDT) Message-ID: <2b59d0dd-3426-4741-a2a9-18275dd613b5@bsdio.com> Date: Fri, 11 Oct 2024 10:47:09 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/1] Prefer use of `static` C keyword over EDK2 type `STATIC` To: Sean Brogan , "devel@edk2.groups.io" , Michael Kinney , Oliver Smith-Denny References: <20241011012040.274642-1-rebecca@bsdio.com> From: "Rebecca Cran" In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 11 Oct 2024 09:47:24 -0700 Resent-From: rebecca@bsdio.com Reply-To: devel@edk2.groups.io,rebecca@bsdio.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: IB28Dp2SaqpN55Fpm8M8ayQgx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=GiCbvm+I; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io I don't know, but I saw a message from Mike recently saying that someone should use 'static' instead of 'STATIC' - so we need to make a clear decision one way or the other. -- Rebecca On 10/10/24 9:41 PM, Sean Brogan wrote: > I think @Oliver Smith-Denny  has > proposed keeping the macro STATIC as a way to enable cleaner and > easier unit tests. Did that get resolved? > > Thanks > Sean > ------------------------------------------------------------------------ > *From:* devel@edk2.groups.io on behalf of > Rebecca Cran > *Sent:* Thursday, October 10, 2024 6:20:39 PM > *To:* Michael Kinney ; > devel@edk2.groups.io > *Cc:* Rebecca Cran > *Subject:* [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/1] > Prefer use of `static` C keyword over EDK2 type `STATIC` > A while ago a decision was made on the edk2-devel mailing list that > the `STATIC` EDK2 type should be replaced with the C keyword `static`. > > Update the Coding Specification to match. While here, remove the > outdated section disallowing static functions since they're no longer > a problem. > > Bump the revision to 2.4 and turn off the draft status. > > Signed-off-by: Rebecca Cran > --- >  5_source_files/54_code_file_structure.md    | 8 +------- >  5_source_files/56_declarations_and_types.md | 2 +- >  README.md                                   | 3 ++- >  book.json                                   | 4 ++-- >  4 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/5_source_files/54_code_file_structure.md > b/5_source_files/54_code_file_structure.md > index 0c4d6a2..6decc60 100644 > --- a/5_source_files/54_code_file_structure.md > +++ b/5_source_files/54_code_file_structure.md > @@ -269,7 +269,7 @@ other than at the top level of a file as specified > by this document. > > >  #### 5.4.2.2 Static > > > > -An object declared `STATIC` has either file or block scope. > > +An object declared `static` has either file or block scope. > > > >  ##### 5.4.2.2.1 Do not reuse an object or function identifier with > static storage duration. > > > > @@ -277,9 +277,3 @@ Throughout the set of source files defined within > a single .inf file, do not >  reuse an identifier with static storage duration. The compiler may not be > >  confused by this, but the user may confuse unrelated variables with > the same > >  name. > > - > > -##### 5.4.2.2.2 Functions should not be declared STATIC. > > - > > -Some source-level debuggers are unable to resolve static functions. > Until it > > -can be verified that no one is dependent upon a debugger with this > limitation, > > -it is strongly recommended that functions not be declared static. > > diff --git a/5_source_files/56_declarations_and_types.md > b/5_source_files/56_declarations_and_types.md > index ec1803d..77e3ce9 100644 > --- a/5_source_files/56_declarations_and_types.md > +++ b/5_source_files/56_declarations_and_types.md > @@ -38,7 +38,7 @@ >  Any abstract type that is defined must be constructed from other > abstract types > >  or from common EFI data types. > > > > -#### 5.6.1.2 The use of int, unsigned, char, void, static, long is a > violation of the coding convention. > > +#### 5.6.1.2 The use of int, unsigned, char, void, long is a > violation of the coding convention. > > > >  The corresponding EFI types must be used instead. > > > > diff --git a/README.md b/README.md > index 77cfdc8..b543bcf 100644 > --- a/README.md > +++ b/README.md > @@ -114,4 +114,5 @@ Copyright (c) 2006-2017, Intel Corporation. All > rights reserved. >  |          | > [#425](https://bugzilla.tianocore.org/show_bug.cgi?id=425) [CCS] > clarify line breaking and indentation requirements for multi-line > function calls |            | > >  |          | > [#1656](https://bugzilla.tianocore.org/show_bug.cgi?id=1656) Update > all Wiki pages for the BSD+Patent license change with SPDX > identifiers        |            | > >  |          | > [#607](https://bugzilla.tianocore.org/show_bug.cgi?id=607) Document > code comment requirements for spurious variable > assignments                   |            | > > -| 2.3      | Add 4.2 Directory names section and update File names > section for the guidelines of module directory and file > naming|September 2022|| > > +| 2.3      | Add 4.2 Directory names section and update File names > section for the guidelines of module directory and file > naming                              |September 2022| > > +| 2.4      | The use of the 'static' C keyword is now preferred over > the EDK2 type 'STATIC' |October 2024| > > diff --git a/book.json b/book.json > index d112b26..3ec7a93 100644 > --- a/book.json > +++ b/book.json > @@ -1,8 +1,8 @@ >  { > >    "variables" : { > > -    "draft"   : "yes", > > +    "draft"   : "no", > >      "title"   : "EDK II C Coding Standards Specification", > > -    "version" : "Revision 2.2" > > +    "version" : "Revision 2.4" > >    }, > >    "plugins": ["puml-aleung"], > >    "pluginsConfig": {} > > -- > 2.46.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#120616): https://edk2.groups.io/g/devel/message/120616 > Mute This Topic: https://groups.io/mt/108941574/1686594 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [spbrogan@outlook.com] > -=-=-=-=-=-= > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120618): https://edk2.groups.io/g/devel/message/120618 Mute This Topic: https://groups.io/mt/108941574/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-