qtest/libqos: Reduce size_to_prdtl() declaration scope
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 13 Mar 2024 18:43:19 +0000 (19:43 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 2 Apr 2024 12:55:32 +0000 (14:55 +0200)
Since size_to_prdtl() is only used within ahci.c,
declare it statically. This removes the last use
of "inlined function with external linkage". See
previous commit and commit 9de9fa5cf2 for rationale.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20240326171009.26696-4-philmd@linaro.org>

tests/qtest/libqos/ahci.c
tests/qtest/libqos/ahci.h

index a2c94c6e060886f9fffead9d17a1f1bb25242ed6..6d59c7551abc93a6899d54afaceaf49754e654f9 100644 (file)
@@ -662,7 +662,7 @@ unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port)
     g_assert_not_reached();
 }
 
-inline unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd)
+static unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd)
 {
     /* Each PRD can describe up to 4MiB */
     g_assert_cmphex(bytes_per_prd, <=, 4096 * 1024);
index 48017864bfacfdd4f0d98327097de9553f9e0b9d..a0487a1557d6471e40d10deeed0e3bc1e0ba897a 100644 (file)
@@ -599,7 +599,6 @@ void ahci_port_check_cmd_sanity(AHCIQState *ahci, AHCICommand *cmd);
 
 /* Misc */
 bool is_atapi(AHCIQState *ahci, uint8_t port);
-unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd);
 
 /* Command: Macro level execution */
 void ahci_guest_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd,