qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v18 01/14] hw/pci: Rename has_power to enabled


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v18 01/14] hw/pci: Rename has_power to enabled
Date: Wed, 8 Jan 2025 17:16:16 +0100
User-agent: Mozilla Thunderbird

On 4/1/25 08:52, Akihiko Odaki wrote:
The renamed state will not only represent powering state of PFs, but
also represent SR-IOV VF enablement in the future.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
  include/hw/pci/pci.h        |  7 ++++++-
  include/hw/pci/pci_device.h |  2 +-
  hw/pci/pci.c                | 14 +++++++-------
  hw/pci/pci_host.c           |  4 ++--
  4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index cefeb388bde5..c1e897f44143 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -674,6 +674,11 @@ static inline void pci_irq_deassert(PCIDevice *pci_dev)
  }
MSIMessage pci_get_msi_message(PCIDevice *dev, int vector);
-void pci_set_power(PCIDevice *pci_dev, bool state);
+void pci_set_enabled(PCIDevice *pci_dev, bool state);
+
+static inline void pci_set_power(PCIDevice *pci_dev, bool state)
+{
+    pci_set_enabled(pci_dev, state);
+}

I'd declare it in hw/pci/pci-internal.h to avoid moving it later to
"pci_device.h". Also I'd not inline it, implementing it in pci.c.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]