From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2515E81F4E for ; Thu, 8 Dec 2016 00:17:29 -0800 (PST) Received: by mail-wm0-x230.google.com with SMTP id t79so13184267wmt.0 for ; Thu, 08 Dec 2016 00:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Xfh4VyElKYb0xLq1FL5tfe27aeV/1MPCBKD7NgRbTCw=; b=eR3YEwR12PtgDl3pde7vliPIILyaaXx2xdq7JZT+4wFQnkkhs54CTzkX0MgtyZyHHT U2r6CaYy1vxaTfvcVCHKYzdSi3kcsUUwUmgsUyR3/ViW2jETvmPK09AyJpEn6gacFdc1 XWBGfJaPn8l3adIIrewFoKfHR17uRYjboQqUE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Xfh4VyElKYb0xLq1FL5tfe27aeV/1MPCBKD7NgRbTCw=; b=M5ycl7Qb/WSz3NvAWcmTr2S5ZyNQyOGewSZ3Mcu8Txd9a80Aup8KrbX13MevDzlExA vJrFq/7RFaQpIaESBjCrt1DQW6SEtL9AW+hI3/u3Kgvy8kvOd1hvGYwRnR3mBlXNPyqn pHOU36zWtpOsvHBPhgYwzA8fcqPklrhUeD60SgT6/uJaBfWpqvnBdrU+/CdoA2jlGv4a +/JGuW9zd++j2w/Szt8cmwchGJe8cqmdoiaAX6PqemmztNaW8783rWfCcRQ24Zkn1XTG HZdKlZvWnZLgTphsGWjTEEn57O8g+iRUgnKosqcdQcFHSdsJoLfuqY6mxHcHUMHzR7jW XsDA== X-Gm-Message-State: AKaTC01Ce8Llse1PjrYhI1X9U9TUwMdGW0cnKnaeAkjfqokKt1Sq3nVStWUlKDfO/5KYxQvY X-Received: by 10.28.105.194 with SMTP id z63mr960247wmh.78.1481185047378; Thu, 08 Dec 2016 00:17:27 -0800 (PST) Received: from localhost.localdomain ([105.144.52.243]) by smtp.gmail.com with ESMTPSA id v202sm13878693wmv.8.2016.12.08.00.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Dec 2016 00:17:26 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, ruiyu.ni@intel.com Cc: Ard Biesheuvel Date: Thu, 8 Dec 2016 08:17:22 +0000 Message-Id: <1481185042-23873-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH] MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers 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: Thu, 08 Dec 2016 08:17:29 -0000 Add missing EFIAPI modifiers to the functions that are exposed via the PCI I/O protocol. At the same time, add a missing UINT8 cast which breaks the build on Visual Studio. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Apologies for the breakage. MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c index 1e7244a129ae..56482e3353c0 100644 --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c @@ -43,7 +43,7 @@ GetBarResource ( return EFI_NOT_FOUND; } - BarIndex -= Dev->BarOffset; + BarIndex -= (UINT8)Dev->BarOffset; for (Desc = Dev->Device->Resources; Desc->Desc != ACPI_END_TAG_DESCRIPTOR; @@ -61,6 +61,7 @@ GetBarResource ( STATIC EFI_STATUS +EFIAPI PciIoPollMem ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -78,6 +79,7 @@ PciIoPollMem ( STATIC EFI_STATUS +EFIAPI PciIoPollIo ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -95,6 +97,7 @@ PciIoPollIo ( STATIC EFI_STATUS +EFIAPI PciIoMemRW ( IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINTN Count, @@ -145,6 +148,7 @@ PciIoMemRW ( STATIC EFI_STATUS +EFIAPI PciIoMemRead ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -211,6 +215,7 @@ PciIoMemRead ( STATIC EFI_STATUS +EFIAPI PciIoMemWrite ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -277,6 +282,7 @@ PciIoMemWrite ( STATIC EFI_STATUS +EFIAPI PciIoIoRead ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -292,6 +298,7 @@ PciIoIoRead ( STATIC EFI_STATUS +EFIAPI PciIoIoWrite ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -307,6 +314,7 @@ PciIoIoWrite ( STATIC EFI_STATUS +EFIAPI PciIoPciRead ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -342,6 +350,7 @@ PciIoPciRead ( STATIC EFI_STATUS +EFIAPI PciIoPciWrite ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -369,6 +378,7 @@ PciIoPciWrite ( STATIC EFI_STATUS +EFIAPI PciIoCopyMem ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, @@ -385,6 +395,7 @@ PciIoCopyMem ( STATIC EFI_STATUS +EFIAPI CoherentPciIoMap ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_OPERATION Operation, @@ -450,6 +461,7 @@ CoherentPciIoMap ( STATIC EFI_STATUS +EFIAPI CoherentPciIoUnmap ( IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping @@ -472,6 +484,7 @@ CoherentPciIoUnmap ( STATIC EFI_STATUS +EFIAPI CoherentPciIoAllocateBuffer ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, @@ -513,6 +526,7 @@ CoherentPciIoAllocateBuffer ( STATIC EFI_STATUS +EFIAPI CoherentPciIoFreeBuffer ( IN EFI_PCI_IO_PROTOCOL *This, IN UINTN Pages, @@ -526,6 +540,7 @@ CoherentPciIoFreeBuffer ( STATIC EFI_STATUS +EFIAPI PciIoFlush ( IN EFI_PCI_IO_PROTOCOL *This ) @@ -535,6 +550,7 @@ PciIoFlush ( STATIC EFI_STATUS +EFIAPI PciIoGetLocation ( IN EFI_PCI_IO_PROTOCOL *This, OUT UINTN *SegmentNumber, @@ -560,6 +576,7 @@ PciIoGetLocation ( STATIC EFI_STATUS +EFIAPI PciIoAttributes ( IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, @@ -616,6 +633,7 @@ PciIoAttributes ( STATIC EFI_STATUS +EFIAPI PciIoGetBarAttributes ( IN EFI_PCI_IO_PROTOCOL *This, IN UINT8 BarIndex, @@ -666,6 +684,7 @@ PciIoGetBarAttributes ( STATIC EFI_STATUS +EFIAPI PciIoSetBarAttributes ( IN EFI_PCI_IO_PROTOCOL *This, IN UINT64 Attributes, -- 2.7.4