All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Juan Quintela <quintela@redhat.com>,
	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 12:13:14 +1100	[thread overview]
Message-ID: <ZUBUqpn26N/hc34x@zatzit> (raw)
In-Reply-To: <6257f025-a000-4f89-88ae-704f51afdb73@kaod.org>

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-10-31  1:40 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 [this message]
2023-10-31 10:15     ` Juan Quintela
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=ZUBUqpn26N/hc34x@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=harshpb@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    /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.