From patchwork Thu Dec 8 08:17:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 87203 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp728300qgi; Thu, 8 Dec 2016 00:17:31 -0800 (PST) X-Received: by 10.98.144.86 with SMTP id a83mr72563126pfe.107.1481185051196; Thu, 08 Dec 2016 00:17:31 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id o1si27864755pgf.36.2016.12.08.00.17.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 00:17:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B73F781F52; Thu, 8 Dec 2016 00:17:30 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Dandan Bi Signed-off-by: Ard Biesheuvel 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,