public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case
Date: Mon, 12 Dec 2016 03:18:13 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8238F3@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1481506014-32772-1-git-send-email-hao.a.wu@intel.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Wu, Hao A
> Sent: Monday, December 12, 2016 9:27 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>; Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type
> mismatch in switch/case
> 
> Fix switch/case statement type mismatch in functions PciIoMemRead &
> PciIoMemWrite.
> 
> Parameter 'Width' is of enum type EFI_PCI_IO_PROTOCOL_WIDTH, but the
> enum type provided in 'switch (Width)' block is of type
> EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
>  .../NonDiscoverablePciDeviceIo.c                   | 48 +++++++++++-----------
>  1 file changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> index 56482e3..82ee9d1 100644
> ---
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> +++
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> Pc
> +++ iDeviceIo.c
> @@ -189,22 +189,22 @@ PciIoMemRead (
>    }
> 
>    switch (Width) {
> -  case EfiPciWidthUint8:
> -  case EfiPciWidthUint16:
> -  case EfiPciWidthUint32:
> -  case EfiPciWidthUint64:
> +  case EfiPciIoWidthUint8:
> +  case EfiPciIoWidthUint16:
> +  case EfiPciIoWidthUint32:
> +  case EfiPciIoWidthUint64:
>      return PciIoMemRW (Width, Count, 1, Buffer, 1, Address);
> 
> -  case EfiPciWidthFifoUint8:
> -  case EfiPciWidthFifoUint16:
> -  case EfiPciWidthFifoUint32:
> -  case EfiPciWidthFifoUint64:
> +  case EfiPciIoWidthFifoUint8:
> +  case EfiPciIoWidthFifoUint16:
> +  case EfiPciIoWidthFifoUint32:
> +  case EfiPciIoWidthFifoUint64:
>      return PciIoMemRW (Width, Count, 1, Buffer, 0, Address);
> 
> -  case EfiPciWidthFillUint8:
> -  case EfiPciWidthFillUint16:
> -  case EfiPciWidthFillUint32:
> -  case EfiPciWidthFillUint64:
> +  case EfiPciIoWidthFillUint8:
> +  case EfiPciIoWidthFillUint16:
> +  case EfiPciIoWidthFillUint32:
> +  case EfiPciIoWidthFillUint64:
>      return PciIoMemRW (Width, Count, 0, Buffer, 1, Address);
> 
>    default:
> @@ -256,22 +256,22 @@ PciIoMemWrite (
>    }
> 
>    switch (Width) {
> -  case EfiPciWidthUint8:
> -  case EfiPciWidthUint16:
> -  case EfiPciWidthUint32:
> -  case EfiPciWidthUint64:
> +  case EfiPciIoWidthUint8:
> +  case EfiPciIoWidthUint16:
> +  case EfiPciIoWidthUint32:
> +  case EfiPciIoWidthUint64:
>      return PciIoMemRW (Width, Count, 1, Address, 1, Buffer);
> 
> -  case EfiPciWidthFifoUint8:
> -  case EfiPciWidthFifoUint16:
> -  case EfiPciWidthFifoUint32:
> -  case EfiPciWidthFifoUint64:
> +  case EfiPciIoWidthFifoUint8:
> +  case EfiPciIoWidthFifoUint16:
> +  case EfiPciIoWidthFifoUint32:
> +  case EfiPciIoWidthFifoUint64:
>      return PciIoMemRW (Width, Count, 0, Address, 1, Buffer);
> 
> -  case EfiPciWidthFillUint8:
> -  case EfiPciWidthFillUint16:
> -  case EfiPciWidthFillUint32:
> -  case EfiPciWidthFillUint64:
> +  case EfiPciIoWidthFillUint8:
> +  case EfiPciIoWidthFillUint16:
> +  case EfiPciIoWidthFillUint32:
> +  case EfiPciIoWidthFillUint64:
>      return PciIoMemRW (Width, Count, 1, Address, 0, Buffer);
> 
>    default:
> --
> 1.9.5.msysgit.0



      reply	other threads:[~2016-12-12  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  1:26 [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case Hao Wu
2016-12-12  3:18 ` Ni, Ruiyu [this message]

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=734D49CCEBEEF84792F5B80ED585239D5B8238F3@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