From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 5129221959CB2 for ; Fri, 28 Dec 2018 16:43:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2018 16:43:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,411,1539673200"; d="scan'208";a="305889044" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 28 Dec 2018 16:43:24 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 28 Dec 2018 16:43:24 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 28 Dec 2018 16:43:24 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.150]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.44]) with mapi id 14.03.0415.000; Sat, 29 Dec 2018 08:43:22 +0800 From: "Wang, Jian J" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" Thread-Topic: [patch] MdeModulePkg/NonDiscoverable: Use compare operator for comparison Thread-Index: AQHUnosiAsquzmc7oke0gJjRob8MjqWU4dmg Date: Sat, 29 Dec 2018 00:43:22 +0000 Message-ID: References: <20181228085429.47056-1-dandan.bi@intel.com> <20181228085429.47056-2-dandan.bi@intel.com> In-Reply-To: <20181228085429.47056-2-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzc0NjE2ZjgtNWM4Ny00ZDRmLTg4NTEtMjU1YzhjZTA0MWQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTGJWazZkSmR0d1FBRVpQeSsxNG03QnQ2aGsrY0JlWTEyRkRseXZVNTg3RmtzMEp4d08xdDZ5XC90bVpKQ2ZvekgifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] MdeModulePkg/NonDiscoverable: Use compare operator for comparison X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2018 00:43:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang > -----Original Message----- > From: Bi, Dandan > Sent: Friday, December 28, 2018 4:54 PM > To: edk2-devel@lists.01.org > Cc: Wang, Jian J ; Wu, Hao A > Subject: [patch] MdeModulePkg/NonDiscoverable: Use compare operator for > comparison >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1422 >=20 > According to EDK II C Coding Standards Specification, > Non-Boolean comparisons must use a compare operator. > This patch is to update the code to follow EDKII coding style. >=20 > Cc: Jian J Wang > Cc: Hao Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi > --- > .../NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > eviceIo.c > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > eviceIo.c > index f0d3472ea5..a0fe3b9ffa 100644 > --- > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > eviceIo.c > +++ > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > eviceIo.c > @@ -1274,11 +1274,11 @@ PciIoAttributes ( > #define DEV_SUPPORTED_ATTRIBUTES \ > (EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) >=20 > Dev =3D NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This); >=20 > - if (Attributes) { > + if (Attributes !=3D 0) { > if ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) !=3D 0) { > return EFI_UNSUPPORTED; > } > } >=20 > -- > 2.18.0.windows.1