qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v8 17/17] pci: Remove legacy errp from pci_add_capability


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v8 17/17] pci: Remove legacy errp from pci_add_capability
Date: Tue, 1 Nov 2022 15:37:38 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

On 1/11/22 14:57, Akihiko Odaki wrote:
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
  hw/pci/pci.c         | 20 +++++---------------
  include/hw/pci/pci.h | 12 ++----------
  2 files changed, 7 insertions(+), 25 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index cce57f572c..41de7643af 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2532,14 +2532,11 @@ bool pci_check_capability_overlap(PCIDevice *pdev, 
uint8_t cap_id,
  }
/*
- * On success, pci_add_capability_legacy() returns a positive value
- * that the offset of the pci capability.
- * On failure, it sets an error and returns a negative error
- * code.
+ * pci_add_capability() returns a positive value that the offset of the pci
+ * capability.

Simpler:

"Return: offset of the PCI capability."

   */
-int pci_add_capability_legacy(PCIDevice *pdev, uint8_t cap_id,
-                              uint8_t offset, uint8_t size,
-                              Error **errp)
+uint8_t pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
+                           uint8_t offset, uint8_t size)
  {
      uint8_t *config;




reply via email to

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