qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/omap_dss.c: Fix !-vs-~ bug in handling DISPC_CONTROL
Date: Wed, 09 Nov 2011 13:45:02 -0600	[thread overview]
Message-ID: <4EBAD83E.4000304@codemonkey.ws> (raw)
In-Reply-To: <1320859206-9507-1-git-send-email-peter.maydell@linaro.org>

On 11/09/2011 11:20 AM, Peter Maydell wrote:
> Fix a bug revealed by a coverity scan (see bug 887883) which meant
> that we would never print the warning about unpredictable behaviour
> if a nonexistent overlay is enabled.
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
> The significant change is s/~/!/, the rest is fixing stuff that would
> otherwise make checkpatch complain (braces, indent, __FUNCTION__).
>
>   hw/omap_dss.c |    9 +++++----
>   1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/hw/omap_dss.c b/hw/omap_dss.c
> index c8387a8..b4a8b4c 100644
> --- a/hw/omap_dss.c
> +++ b/hw/omap_dss.c
> @@ -389,10 +389,11 @@ static void omap_disc_write(void *opaque, target_phys_addr_t addr,
>           s->dig.enable = (value>>  1)&  1;
>           s->lcd.enable = (value>>  0)&  1;
>           if (value&  (1<<  12))			/* OVERLAY_OPTIMIZATION */
> -            if (~((s->dispc.l[1].attr | s->dispc.l[2].attr)&  1))
> -                 fprintf(stderr, "%s: Overlay Optimization when no overlay "
> -                                 "region effectively exists leads to "
> -                                 "unpredictable behaviour!\n", __FUNCTION__);
> +            if (!((s->dispc.l[1].attr | s->dispc.l[2].attr)&  1)) {
> +                fprintf(stderr, "%s: Overlay Optimization when no overlay "
> +                        "region effectively exists leads to "
> +                        "unpredictable behaviour!\n", __func__);
> +            }
>           if (value&  (1<<  6)) {				/* GODIGITAL */
>               /* XXX: Shadowed fields are:
>                * s->dispc.config

      reply	other threads:[~2011-11-09 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 17:20 [Qemu-devel] [PATCH] hw/omap_dss.c: Fix !-vs-~ bug in handling DISPC_CONTROL Peter Maydell
2011-11-09 19:45 ` Anthony Liguori [this message]

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=4EBAD83E.4000304@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 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).