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.88; helo=mga01.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 0E86B2119FF4B for ; Fri, 28 Dec 2018 00:55:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2018 00:55:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,408,1539673200"; d="scan'208";a="129677870" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga002.fm.intel.com with ESMTP; 28 Dec 2018 00:55:35 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Jian J Wang , Hao Wu Date: Fri, 28 Dec 2018 16:54:29 +0800 Message-Id: <20181228085429.47056-2-dandan.bi@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20181228085429.47056-1-dandan.bi@intel.com> References: <20181228085429.47056-1-dandan.bi@intel.com> Subject: [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: Fri, 28 Dec 2018 08:55:37 -0000 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1422 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. 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(-) diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c index f0d3472ea5..a0fe3b9ffa 100644 --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c @@ -1274,11 +1274,11 @@ PciIoAttributes ( #define DEV_SUPPORTED_ATTRIBUTES \ (EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This); - if (Attributes) { + if (Attributes != 0) { if ((Attributes & (~(DEV_SUPPORTED_ATTRIBUTES))) != 0) { return EFI_UNSUPPORTED; } } -- 2.18.0.windows.1