From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web12.2903.1607394707021187759 for ; Mon, 07 Dec 2020 18:31:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D48eBFl1; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607394706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jUzqanS6oJybAEGrbJKKtmKGo2XnneMsR6MTDykl5ow=; b=D48eBFl1yll+BeEoKRPYn0N20p0iUDhSsO3o8RtjZQeH2FgoDPLjgC4WSorwrWfvRvxSGl IK7vd1C1vF+D1JvntEmgCyYaxywx1XNQK+6VjJ+dG1zZoxI0CXLyi4DQ6r1wK4spEylRml 8XogsRx2wthgOevewGFxpzvlZB+FaGA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-EFBXLArXN3yuQL5BKlxNXw-1; Mon, 07 Dec 2020 21:31:44 -0500 X-MC-Unique: EFBXLArXN3yuQL5BKlxNXw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1E748030AC; Tue, 8 Dec 2020 02:31:42 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-30.ams2.redhat.com [10.36.112.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64E6A5D6D5; Tue, 8 Dec 2020 02:31:41 +0000 (UTC) Subject: Re: [edk2-devel] [edk2-CCodingStandardsSpecification PATCH 1/1] Update the Name Space Rules page examples to follow the coding standard To: devel@edk2.groups.io, rebecca@nuviainc.com, Michael D Kinney Cc: Leif Lindholm , Andrew Fish References: <20201207022520.7963-1-rebecca@nuviainc.com> From: "Laszlo Ersek" Message-ID: Date: Tue, 8 Dec 2020 03:31:40 +0100 MIME-Version: 1.0 In-Reply-To: <20201207022520.7963-1-rebecca@nuviainc.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Rebecca, On 12/07/20 03:25, Rebecca Cran wrote: > The examples in the 45_name_space_rules.md files doesn't follow the > coding standard in the following ways: > > - Only use UEFI data types. Use of standard C data types is prohibited. > - Identifiers shall contain mixed upper- and lower-case text. > > Signed-off-by: Rebecca Cran > Contributed-under: TianoCore Contribution Agreement 1.1 > --- > 4_naming_conventions/45_name_space_rules.md | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/4_naming_conventions/45_name_space_rules.md b/4_naming_conventions/45_name_space_rules.md > index 1234250756cc..ecdebbe28339 100644 > --- a/4_naming_conventions/45_name_space_rules.md > +++ b/4_naming_conventions/45_name_space_rules.md > @@ -53,9 +53,9 @@ tags may be reused only for union types. > > ```c > typedef struct MyStruct { > - int one; > - int two; > - int three; > + UINT32 One; > + UINT32 Two; > + UINT32 Three; > } MY_STRUCT; > ``` Style-wise, the update looks good. Code wise, I can't tell from this context whether changing from int to UINT32 makes any difference. I guess using INT32 rather than UINT32 would fix the style, and also keep the C language meaning identical. So please consider going with INT32, but if it doesn't matter (again, I can't tell from this context), then feel free to keep the UINT32. Either way: Reviewed-by: Laszlo Ersek Mike, can you please push this? Thanks! Laszlo > > @@ -68,14 +68,14 @@ Exceptions are structure member and union member names. > > ```c > typedef struct StructOne { > - INT32 one; > - INT16 two; > + INT32 One; > + INT16 Two; > struct StructOne *MySelf; > } STRUCT_ONE; > > typedef struct StructTwo { > - INT16 one; > - INT8 *two; > + INT16 One; > + INT8 *Two; > struct StructTwo *MySelf; > } STRUCT_TWO; > >