From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: michael.d.kinney@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Mon, 15 Apr 2019 08:53:19 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 08:53:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="337668799" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga006.fm.intel.com with ESMTP; 15 Apr 2019 08:53:18 -0700 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 08:53:17 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.24]) by ORSMSX162.amr.corp.intel.com ([169.254.3.253]) with mapi id 14.03.0415.000; Mon, 15 Apr 2019 08:53:17 -0700 From: "Michael D Kinney" To: Leif Lindholm , "Wu, Hao A" , "Kinney, Michael D" CC: Ard Biesheuvel , "devel@edk2.groups.io" , Andrew Fish , "Zeng, Star" , "Dong, Eric" , "Ni, Ray" , "Gao, Liming" , "Carsey, Jaben" , "Shi, Steven" , "Wang, Jian J" Subject: Re: [PATCH v6 1/7] MdeModulePkg: introduce PE/COFF image emulator protocol Thread-Topic: [PATCH v6 1/7] MdeModulePkg: introduce PE/COFF image emulator protocol Thread-Index: AQHU8vungLQCFm7XQkGR2qe3cxYLsqY84vWAgACAVID///xcgA== Date: Mon, 15 Apr 2019 15:53:17 +0000 Message-ID: References: <20190414195233.30045-1-ard.biesheuvel@linaro.org> <20190414195233.30045-2-ard.biesheuvel@linaro.org> <20190415090229.biz2hxcuvo35ieyr@bivouac.eciton.net> In-Reply-To: <20190415090229.biz2hxcuvo35ieyr@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, This is not a macro that is to be used by C code. It is a technique to prevent recursive includes on a .h file. As a result, we do not want to use the C Coding Standard macro style. Are there other techniques to prevent recursive includes? I agree that macros/symbols that start with single or double '_' are reserved by compilers/linkers, which is why the warning is=20 triggered and it would be better if we use a different technique. The current style assumes that the define symbol used will not collide with a compiler/linker symbol. The names are verbose, so the chances of a collision are very low. Mike > -----Original Message----- > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > Sent: Monday, April 15, 2019 2:02 AM > To: Wu, Hao A > Cc: Ard Biesheuvel ; > devel@edk2.groups.io; Kinney, Michael D > ; Andrew Fish > ; Zeng, Star ; > Dong, Eric ; Ni, Ray > ; Gao, Liming ; > Carsey, Jaben ; Shi, Steven > ; Wang, Jian J > > Subject: Re: [PATCH v6 1/7] MdeModulePkg: introduce > PE/COFF image emulator protocol >=20 > On Mon, Apr 15, 2019 at 01:23:11AM +0000, Wu, Hao A > wrote: > > > + This program and the accompanying materials are > licensed and made > > > available > > > + under the terms and conditions of the BSD > License which accompanies this > > > + distribution. The full text of the license may > be found at > > > + http://opensource.org/licenses/bsd-license.php > > > + > > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE > ON AN "AS IS" > > > BASIS, > > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > KIND, EITHER > > > EXPRESS OR IMPLIED. > > > + > > > +**/ > > > + > > > +#ifndef PECOFF_IMAGE_EMULATOR_PROTOCOL_GUID_H > > > +#define PECOFF_IMAGE_EMULATOR_PROTOCOL_GUID_H > > > > Hello Ard, > > > > Sorry for the delayed response. > > > > Could you help to use: > > _PECOFF_IMAGE_EMULATOR_PROTOCOL_GUID_H_ > > > > here to please the Ecc checker when you push the > series? >=20 > Hmm... >=20 > Not a major issue, but I'll mention it anyway (which I > mentioned to > Andrew/Mike at Linaro Connect in Vancouver last year): > clang has a warning, enabled by -Wreserved-id-macro, > which complains > about this. >=20 > The Coding Style matches this, suggesting > MACROS_SHOULD_BE_WRITTEN_THUS_. So do we need to fix > Ecc? >=20 > Regards, >=20 > Leif