All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: figlesia@xilinx.com,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Sai Pavan Boddu" <sai.pavan.boddu@xilinx.com>,
	"Francisco Iglesias" <frasse.iglesias@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"KONRAD Frederic" <frederic.konrad@adacore.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Luc Michel" <luc.michel@greensocs.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v1 3/3] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes
Date: Thu, 23 Apr 2020 13:44:07 +0200	[thread overview]
Message-ID: <20200423114407.GE4289@toto> (raw)
In-Reply-To: <CAFEAcA8D2HSPg8-ZvFBocmz+QRXTzhJcjDG21PCk7+_N7+2o1g@mail.gmail.com>

On Thu, Apr 23, 2020 at 12:21:11PM +0100, Peter Maydell wrote:
> On Sun, 19 Apr 2020 at 17:27, Edgar E. Iglesias
> <edgar.iglesias@gmail.com> wrote:
> >
> > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> >
> > Disable unsupported FDT firmware nodes if a user passes us
> > a DTB with nodes enabled that the machine cannot support
> > due to lack of EL3 or EL2 support.
> >
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> > ---
> >  hw/arm/xlnx-zcu102.c | 31 +++++++++++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> > +static void zcu102_modify_dtb(const struct arm_boot_info *binfo, void *fdt)
> > +{
> > +    XlnxZCU102 *s = container_of(binfo, XlnxZCU102, binfo);
> > +    bool method_is_hvc;
> > +    char **node_path;
> > +    const char *r;
> > +    int prop_len;
> > +    int i;
> > +
> > +    /* If EL3 is enabled, we keep all firmware nodes active.  */
> > +    if (!s->secure) {
> > +        node_path = qemu_fdt_node_path(fdt, NULL,
> > +                                       (char *)"xlnx,zynqmp-firmware",
> > +                                       &error_fatal);
> 
> Why do we need the 'char *' cast ?


Without it, I see the following warning but compat in
qemu_fdt_node_path should probably be changed to const char *.
I can make that change in a v2 if you prefer.


  CC      aarch64-softmmu/hw/arm/xlnx-zcu102.o
/home/edgar/src/c/qemu/qemu/hw/arm/xlnx-zcu102.c: In function ‘zcu102_modify_dtb’:
/home/edgar/src/c/qemu/qemu/hw/arm/xlnx-zcu102.c:84:40: error: passing argument 3 of ‘qemu_fdt_node_path’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   84 |                                        "xlnx,zynqmp-firmware",
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/edgar/src/c/qemu/qemu/hw/arm/xlnx-zcu102.c:26:
/home/edgar/src/c/qemu/qemu/include/sysemu/device_tree.h:46:8: note: expected ‘char *’ but argument is of type ‘const char *’
   46 | char **qemu_fdt_node_path(void *fdt, const char *name, char *compat,
      |        ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/home/edgar/src/c/qemu/qemu/rules.mak:69: hw/arm/xlnx-zcu102.o] Error 1
make: *** [Makefile:527: aarch64-softmmu/all] Error 2

Cheers,
Edgar


  reply	other threads:[~2020-04-23 11:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19 16:27 [PATCH v1 0/3] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes Edgar E. Iglesias
2020-04-19 16:27 ` [PATCH v1 1/3] device_tree: Allow name wildcards in qemu_fdt_node_path() Edgar E. Iglesias
2020-04-20 19:44   ` Alistair Francis
2020-04-19 16:27 ` [PATCH v1 2/3] hw/arm: xlnx-zcu102: Move arm_boot_info into XlnxZCU102 Edgar E. Iglesias
2020-04-20  6:47   ` Philippe Mathieu-Daudé
2020-04-19 16:27 ` [PATCH v1 3/3] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes Edgar E. Iglesias
2020-04-20 19:46   ` Alistair Francis
2020-04-23 11:21   ` Peter Maydell
2020-04-23 11:44     ` Edgar E. Iglesias [this message]
2020-04-23 11:46       ` Peter Maydell

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=20200423114407.GE4289@toto \
    --to=edgar.iglesias@xilinx.com \
    --cc=alistair@alistair23.me \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgar.iglesias@gmail.com \
    --cc=figlesia@xilinx.com \
    --cc=frasse.iglesias@gmail.com \
    --cc=frederic.konrad@adacore.com \
    --cc=luc.michel@greensocs.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sai.pavan.boddu@xilinx.com \
    --cc=sstabellini@kernel.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.