public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wang, Jian J" <jian.j.wang@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>
Subject: Re: [patch] MdeModulePkg/NonDiscoverable: Use compare operator for comparison
Date: Sat, 29 Dec 2018 00:43:22 +0000	[thread overview]
Message-ID: <D827630B58408649ACB04F44C510003624EDECCE@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20181228085429.47056-2-dandan.bi@intel.com>


Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, December 28, 2018 4:54 PM
> To: edk2-devel@lists.01.org
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> 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 <jian.j.wang@intel.com>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  .../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



  reply	other threads:[~2018-12-29  0:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28  8:54 [patch] BaseTools/VfrCompile: report error for Integer overflow Dandan Bi
2018-12-28  8:54 ` [patch] MdeModulePkg/NonDiscoverable: Use compare operator for comparison Dandan Bi
2018-12-29  0:43   ` Wang, Jian J [this message]
2019-01-01 13:17   ` Zeng, Star
2019-01-02  1:42     ` Bi, Dandan
2019-01-07 14:30 ` [patch] BaseTools/VfrCompile: report error for Integer overflow Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D827630B58408649ACB04F44C510003624EDECCE@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox