qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/omap_dss.c: Fix !-vs-~ bug in handling DISPC


From: Anthony Liguori
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
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

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<address@hidden>

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 via email to

[Prev in Thread] Current Thread [Next in Thread]