From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 30 Sep 2019 13:35:06 -0700 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3ED4583F42; Mon, 30 Sep 2019 20:35:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-111.rdu2.redhat.com [10.10.121.111]) by smtp.corp.redhat.com (Postfix) with ESMTP id 804EF196B2; Mon, 30 Sep 2019 20:35:05 +0000 (UTC) Subject: Re: [edk2-devel] [Patch 05/12] MdePkg BaseIoLibIntrinsic: Remove __inline__ attribute for IO functions To: devel@edk2.groups.io, liming.gao@intel.com References: <1569570395-11240-1-git-send-email-liming.gao@intel.com> <1569570395-11240-6-git-send-email-liming.gao@intel.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 30 Sep 2019 22:35:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1569570395-11240-6-git-send-email-liming.gao@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 30 Sep 2019 20:35:06 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Liming, On 09/27/19 09:46, Liming Gao wrote: > __inline__ attribute will make the functions not be exposed as the > library interface. It will cause CLANG9 compiler fail. > > Signed-off-by: Liming Gao > --- > MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c | 6 ------ > 1 file changed, 6 deletions(-) Did you regression-test this change against GCC48 (for example)? I can't tell why we have the __inline__'s in the first place. They date back to historical commit e1f414b6a7d8 ("Import some basic libraries instances for Mde Packages.", 2007-06-22). And that commit does not explain __inline__. If we remove __inline__ for the whole GCC toolchain *family*, then I think we need a better justification than just "makes CLANG9 fail". Thanks Laszlo > diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c > index 055f0a947e..b3a1a20256 100644 > --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c > +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c > @@ -32,7 +32,6 @@ > @return The value read. > > **/ > -__inline__ > UINT8 > EFIAPI > IoRead8 ( > @@ -60,7 +59,6 @@ IoRead8 ( > @return The value written the I/O port. > > **/ > -__inline__ > UINT8 > EFIAPI > IoWrite8 ( > @@ -87,7 +85,6 @@ IoWrite8 ( > @return The value read. > > **/ > -__inline__ > UINT16 > EFIAPI > IoRead16 ( > @@ -117,7 +114,6 @@ IoRead16 ( > @return The value written the I/O port. > > **/ > -__inline__ > UINT16 > EFIAPI > IoWrite16 ( > @@ -145,7 +141,6 @@ IoWrite16 ( > @return The value read. > > **/ > -__inline__ > UINT32 > EFIAPI > IoRead32 ( > @@ -175,7 +170,6 @@ IoRead32 ( > @return The value written the I/O port. > > **/ > -__inline__ > UINT32 > EFIAPI > IoWrite32 ( >