diff mbox

cirrus: fix PUTPIXEL macro

Message ID 1490168303-24588-1-git-send-email-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gerd Hoffmann March 22, 2017, 7:38 a.m. UTC
Should be "c" not "col".  The macro is used with "col" as third parameter
everywhere, so this tyops doesn't break something.

Fixes: 026aeffcb4752054830ba203020ed6eb05bcaba8
Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/cirrus_vga_rop2.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dr. David Alan Gilbert March 22, 2017, 11:41 a.m. UTC | #1
* Gerd Hoffmann (kraxel@redhat.com) wrote:
> Should be "c" not "col".  The macro is used with "col" as third parameter
> everywhere, so this tyops doesn't break something.
> 
> Fixes: 026aeffcb4752054830ba203020ed6eb05bcaba8
> Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  hw/display/cirrus_vga_rop2.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/display/cirrus_vga_rop2.h b/hw/display/cirrus_vga_rop2.h
> index b86bcd6..b208b73 100644
> --- a/hw/display/cirrus_vga_rop2.h
> +++ b/hw/display/cirrus_vga_rop2.h
> @@ -29,8 +29,8 @@
>  #elif DEPTH == 24
>  #define PUTPIXEL(s, a, c)    do {          \
>          ROP_OP(s, a,     c);               \
> -        ROP_OP(s, a + 1, (col >> 8));      \
> -        ROP_OP(s, a + 2, (col >> 16));     \
> +        ROP_OP(s, a + 1, (c >> 8));        \
> +        ROP_OP(s, a + 2, (c >> 16));       \
>      } while (0)
>  #elif DEPTH == 32
>  #define PUTPIXEL(s, a, c)    ROP_OP_32(s, a, c)
> -- 
> 1.8.3.1
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox

Patch

diff --git a/hw/display/cirrus_vga_rop2.h b/hw/display/cirrus_vga_rop2.h
index b86bcd6..b208b73 100644
--- a/hw/display/cirrus_vga_rop2.h
+++ b/hw/display/cirrus_vga_rop2.h
@@ -29,8 +29,8 @@ 
 #elif DEPTH == 24
 #define PUTPIXEL(s, a, c)    do {          \
         ROP_OP(s, a,     c);               \
-        ROP_OP(s, a + 1, (col >> 8));      \
-        ROP_OP(s, a + 2, (col >> 16));     \
+        ROP_OP(s, a + 1, (c >> 8));        \
+        ROP_OP(s, a + 2, (c >> 16));       \
     } while (0)
 #elif DEPTH == 32
 #define PUTPIXEL(s, a, c)    ROP_OP_32(s, a, c)