From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 EE441820EB for ; Sun, 11 Dec 2016 19:18:17 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 11 Dec 2016 19:18:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,334,1477983600"; d="scan'208";a="201490469" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 11 Dec 2016 19:18:17 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 11 Dec 2016 19:18:17 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.11]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Mon, 12 Dec 2016 11:18:13 +0800 From: "Ni, Ruiyu" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: Ard Biesheuvel Thread-Topic: [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case Thread-Index: AQHSVBbVeL8l5YLV0EGVPrHBUt9xSqEDpH1w Date: Mon, 12 Dec 2016 03:18:13 +0000 Deferred-Delivery: Mon, 12 Dec 2016 03:18:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8238F3@SHSMSX103.ccr.corp.intel.com> References: <1481506014-32772-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1481506014-32772-1-git-send-email-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 03:18:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni 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 ; Ard Biesheuvel > ; Ni, Ruiyu > Subject: [PATCH] MdeModulePkg/NonDiscoverablePciDev: Fix type > mismatch in switch/case >=20 > Fix switch/case statement type mismatch in functions PciIoMemRead & > PciIoMemWrite. >=20 > 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. >=20 > Cc: Ard Biesheuvel > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Hao Wu > --- > .../NonDiscoverablePciDeviceIo.c | 48 +++++++++++-----= ------ > 1 file changed, 24 insertions(+), 24 deletions(-) >=20 > 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 ( > } >=20 > 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); >=20 > - case EfiPciWidthFifoUint8: > - case EfiPciWidthFifoUint16: > - case EfiPciWidthFifoUint32: > - case EfiPciWidthFifoUint64: > + case EfiPciIoWidthFifoUint8: > + case EfiPciIoWidthFifoUint16: > + case EfiPciIoWidthFifoUint32: > + case EfiPciIoWidthFifoUint64: > return PciIoMemRW (Width, Count, 1, Buffer, 0, Address); >=20 > - case EfiPciWidthFillUint8: > - case EfiPciWidthFillUint16: > - case EfiPciWidthFillUint32: > - case EfiPciWidthFillUint64: > + case EfiPciIoWidthFillUint8: > + case EfiPciIoWidthFillUint16: > + case EfiPciIoWidthFillUint32: > + case EfiPciIoWidthFillUint64: > return PciIoMemRW (Width, Count, 0, Buffer, 1, Address); >=20 > default: > @@ -256,22 +256,22 @@ PciIoMemWrite ( > } >=20 > 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); >=20 > - case EfiPciWidthFifoUint8: > - case EfiPciWidthFifoUint16: > - case EfiPciWidthFifoUint32: > - case EfiPciWidthFifoUint64: > + case EfiPciIoWidthFifoUint8: > + case EfiPciIoWidthFifoUint16: > + case EfiPciIoWidthFifoUint32: > + case EfiPciIoWidthFifoUint64: > return PciIoMemRW (Width, Count, 0, Address, 1, Buffer); >=20 > - case EfiPciWidthFillUint8: > - case EfiPciWidthFillUint16: > - case EfiPciWidthFillUint32: > - case EfiPciWidthFillUint64: > + case EfiPciIoWidthFillUint8: > + case EfiPciIoWidthFillUint16: > + case EfiPciIoWidthFillUint32: > + case EfiPciIoWidthFillUint64: > return PciIoMemRW (Width, Count, 1, Address, 0, Buffer); >=20 > default: > -- > 1.9.5.msysgit.0