diff mbox

[Linaro-uefi,v4,28/56] Chips/Hisilicon/Ehci: Fix clang build error

Message ID 1479544691-59575-29-git-send-email-heyi.guo@linaro.org
State Accepted
Commit 70e228eccdf85a2f03df5b9270df28d81dc3e3b4
Headers show

Commit Message

gary guo Nov. 19, 2016, 8:37 a.m. UTC
Remove one force-cast code to avoid clang build error.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <guoheyi@huawei.com>
---
 Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leif Lindholm Nov. 29, 2016, 6:36 p.m. UTC | #1
On Sat, Nov 19, 2016 at 04:37:43PM +0800, Heyi Guo wrote:
> Remove one force-cast code to avoid clang build error.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Heyi Guo <guoheyi@huawei.com>

This is already safe on master, so:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Pushed as 70e228eccdf85a2f03df5b9270df28d81dc3e3b4.

> ---
>  Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c b/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
> index d14f9df..0cb1e80 100644
> --- a/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
> +++ b/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
> @@ -193,7 +193,7 @@ EhciPciIoMemWrite (
>      return EFI_INVALID_PARAMETER;
>    }
>  
> -  Width     = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);
> +  Width     = Width & 0x03;
>  
>    //
>    // Loop for each iteration and move the data
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c b/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
index d14f9df..0cb1e80 100644
--- a/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
+++ b/Chips/Hisilicon/Drivers/VirtualEhciPciIo/VirtualEhciPciIo.c
@@ -193,7 +193,7 @@  EhciPciIoMemWrite (
     return EFI_INVALID_PARAMETER;
   }
 
-  Width     = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);
+  Width     = Width & 0x03;
 
   //
   // Loop for each iteration and move the data