On 2/12/24 22:11, Philippe Mathieu-Daudé wrote:
Introduce the 'ich9' variable and inline ahci_get_num_ports().

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  include/hw/ide/ahci.h | 1 -
  hw/i386/pc_q35.c      | 6 ++++--
  hw/ide/ahci.c         | 8 --------
  hw/mips/boston.c      | 6 ++++--
  4 files changed, 8 insertions(+), 13 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

As far as it goes.  But it certainly highlights that

+        g_assert(MAX_SATA_PORTS == ich9->ahci.ports);
+        ide_drive_get(hd, ich9->ahci.ports);
....
+    g_assert(ARRAY_SIZE(hd) == ich9->ahci.ports);
+    ide_drive_get(hd, ich9->ahci.ports);

ports is always a constant.  Or perhaps that's only from this PCI usage?


r~


Reply via email to