Reviewed-by: Jian J Wang <[email protected]>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, December 28, 2018 4:54 PM
> To: [email protected]
> Cc: Wang, Jian J <[email protected]>; Wu, Hao A <[email protected]>
> Subject: [patch] MdeModulePkg/NonDiscoverable: Use compare operator for
> comparison
> 
> 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 <[email protected]>
> Cc: Hao Wu <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <[email protected]>
> ---
>  .../NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c    | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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)
> 
>    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

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to