qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Thomas Huth <thuth@redhat.com>
Cc: "Cédric Le Goater" <clg@kaod.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc/pnv: check for firmware file presence
Date: Mon, 25 Sep 2017 10:52:56 +0200	[thread overview]
Message-ID: <20170925105256.6b8b57ff@bahia.lan> (raw)
In-Reply-To: <30287e8a-e697-b33e-bcf0-94bf7fe291de@redhat.com>

On Mon, 25 Sep 2017 10:46:13 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 25.09.2017 10:33, Cédric Le Goater wrote:
> > and exit before uslessly trying to load it if the file does  
> 
> s/uslessly/uselessly/
> 
> > not exists.
> > 
> > Issue dicovered by Coverity Scan.  
> 
> /dicovered/discovered/
> 

Mentioning the Coverity Id (ie, CID 1381410) is also a usual practice.

> > Signed-off-by: Cédric Le Goater <clg@kaod.org>
> > ---
> >  hw/ppc/pnv.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> > index 47221158d415..7728eece2eec 100644
> > --- a/hw/ppc/pnv.c
> > +++ b/hw/ppc/pnv.c
> > @@ -570,6 +570,10 @@ static void ppc_powernv_init(MachineState *machine)
> >      }
> >  
> >      fw_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> > +    if (!fw_filename) {
> > +        error_report("Could not find OPAL '%s'", bios_name);  
> 
> I'd suggest to say "OPAL firmware" instead of just "OPAL". Not every
> user knows what OPAL is.
> 

With all the suggested changes:

Reviewed-by: Greg Kurz <groug@kaod.org>

> > +        exit(1);
> > +    }
> >  
> >      fw_size = load_image_targphys(fw_filename, FW_LOAD_ADDR, FW_MAX_SIZE);
> >      if (fw_size < 0) {
> >   
> 
>  Thomas



-- 
Gregory Kurz                                     kurzgreg@fr.ibm.com
                                                 gkurz@linux.vnet.ibm.com
Software Engineer @ IBM/LTC                      http://www.ibm.com
Tel 33-5-6218-1607

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.

  parent reply	other threads:[~2017-09-25  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  8:33 [Qemu-devel] [PATCH] ppc/pnv: check for firmware file presence Cédric Le Goater
2017-09-25  8:46 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2017-09-25  8:52   ` Cédric Le Goater
2017-09-25  8:52   ` Greg Kurz [this message]
2017-09-25  9:00     ` Cédric Le Goater

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=20170925105256.6b8b57ff@bahia.lan \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).