summaryrefslogtreecommitdiffstats
path: root/hw/pcie_aer.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-12-04 17:37:35 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-12-04 18:36:22 +0000
commite6e055c9d79c665de200fc46c746d403d3d943ad (patch)
treeb79601e7bc09391e16de98bb1a55202e7eb0147a /hw/pcie_aer.c
parentbcd478781ab1d11911ab5505c34b5577de904eeb (diff)
downloadhqemu-e6e055c9d79c665de200fc46c746d403d3d943ad.zip
hqemu-e6e055c9d79c665de200fc46c746d403d3d943ad.tar.gz
Fix mingw32 and OpenBSD warnings
ffsl() is not universally available, so there are these warnings on both mingw32 and OpenBSD: /src/qemu/hw/pcie_aer.c: In function 'pcie_aer_update_log': /src/qemu/hw/pcie_aer.c:399: warning: implicit declaration of function 'ffsl' Since status field in PCIEAERErr is uint32_t, we can just use ffs() instead. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pcie_aer.c')
-rw-r--r--hw/pcie_aer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pcie_aer.c b/hw/pcie_aer.c
index 235ac53..47d6400 100644
--- a/hw/pcie_aer.c
+++ b/hw/pcie_aer.c
@@ -396,7 +396,7 @@ static void pcie_aer_msg(PCIDevice *dev, const PCIEAERMsg *msg)
static void pcie_aer_update_log(PCIDevice *dev, const PCIEAERErr *err)
{
uint8_t *aer_cap = dev->config + dev->exp.aer_cap;
- uint8_t first_bit = ffsl(err->status) - 1;
+ uint8_t first_bit = ffs(err->status) - 1;
uint32_t errcap = pci_get_long(aer_cap + PCI_ERR_CAP);
int i;
OpenPOWER on IntegriCloud