From 44c11b2e69d845e487d0184079899ef15ab626a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 13 Feb 2024 06:29:00 +0100 Subject: hw/ide/ahci: Convert AHCIState::ports to unsigned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AHCIState::ports should be unsigned. Besides, we never check it for negative value. It is unlikely it was ever used with more than INT32_MAX ports, so it is safe to convert it to unsigned. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-7-philmd@linaro.org> --- include/hw/ide/ahci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/ide') diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 8cd55b1..604d3a0 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -46,7 +46,7 @@ typedef struct AHCIState { MemoryRegion idp; /* Index-Data Pair I/O port space */ unsigned idp_offset; /* Offset of index in I/O port space */ uint32_t idp_index; /* Current IDP index */ - int32_t ports; + uint32_t ports; qemu_irq irq; AddressSpace *as; } AHCIState; -- cgit v1.1