qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH] ppc: qtest already exports qtest_rtas_call()


From: David Gibson
Subject: Re: [PATCH] ppc: qtest already exports qtest_rtas_call()
Date: Tue, 31 Oct 2023 12:13:14 +1100

On Mon, Oct 30, 2023 at 05:41:36PM +0100, Cédric le Goater wrote:
> On 10/30/23 17:38, Juan Quintela wrote:
> > Having two functions with the same name is a bad idea.  As spapr only
> > uses the function locally, made it static.
> > 
> > When you compile with clang, you get this compilation error:
> > 
> > /usr/bin/ld: tests/qtest/libqos/libqos.fa.p/.._libqtest.c.o: in function 
> > `qtest_rtas_call':
> > /scratch/qemu/clang/full/all/../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:1195:
> >  multiple definition of `qtest_rtas_call'; 
> > libqemu-ppc64-softmmu.fa.p/hw_ppc_spapr_rtas.c.o:/scratch/qemu/clang/full/all/../../../../../mnt/code/qemu/full/hw/ppc/spapr_rtas.c:536:
> >  first defined here
> > clang-16: error: linker command failed with exit code 1 (use -v to see 
> > invocation)
> > ninja: build stopped: subcommand failed.
> > make: *** [Makefile:162: run-ninja] Error 1
> > 
> > Signed-off-by: Juan Quintela <quintela@redhat.com>
> 
> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>

I think changing the name of one of the functions would be even
better.  Making it static means it won't confuse the compiler, but it
can still confuse people.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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