Message ID | 20240313184954.42513-4-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | overall: Avoid using inlined functions with external linkage again | expand |
On Wed, 13 Mar 2024 at 18:50, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > See previous commit and commit 9de9fa5cf2 ("Avoid using inlined > functions with external linkage") for rationale. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > tests/qtest/libqos/ahci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c > index a2c94c6e06..135b23ffd9 100644 > --- a/tests/qtest/libqos/ahci.c > +++ b/tests/qtest/libqos/ahci.c > @@ -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) > +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); It looks like this function is only used in this file, so we could make it static ? -- PMM
On 13/3/24 20:39, Peter Maydell wrote: > On Wed, 13 Mar 2024 at 18:50, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: >> >> See previous commit and commit 9de9fa5cf2 ("Avoid using inlined >> functions with external linkage") for rationale. >> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> >> --- >> tests/qtest/libqos/ahci.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c >> index a2c94c6e06..135b23ffd9 100644 >> --- a/tests/qtest/libqos/ahci.c >> +++ b/tests/qtest/libqos/ahci.c >> @@ -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) >> +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); > > It looks like this function is only used in this file, so > we could make it static ? Eh I did check for that, but sure how I missed it...
diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index a2c94c6e06..135b23ffd9 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -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) +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);
See previous commit and commit 9de9fa5cf2 ("Avoid using inlined functions with external linkage") for rationale. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- tests/qtest/libqos/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)