All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>,
	qemu-devel@nongnu.org,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	qemu-ppc@nongnu.org,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Nicholas Piggin" <npiggin@gmail.com>
Subject: Re: [PATCH] ppc: qtest already exports qtest_rtas_call()
Date: Tue, 31 Oct 2023 11:15:14 +0100	[thread overview]
Message-ID: <878r7j9jyl.fsf@secure.mitica> (raw)
In-Reply-To: <ZUBUqpn26N/hc34x@zatzit> (David Gibson's message of "Tue, 31 Oct 2023 12:13:14 +1100")

David Gibson <david@gibson.dropbear.id.au> wrote:
> 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.

I think that made it static when it is not used anywhere else is a good
idea.

After that, I don't understand it enough to make a rename that makes
sense.

This patch is the typical fix for "make all" with clang fails here.
I let ppc maintainers to do anything more sensible.

Later, Juan.



  reply	other threads:[~2023-10-31 10:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 16:38 [PATCH] ppc: qtest already exports qtest_rtas_call() Juan Quintela
2023-10-30 16:41 ` Cédric Le Goater
2023-10-31  1:13   ` David Gibson
2023-10-31 10:15     ` Juan Quintela [this message]
2023-10-31 10:22       ` Cédric Le Goater
2023-11-07 18:56 ` Daniel Henrique Barboza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r7j9jyl.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=harshpb@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.