[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/21] sm501: Use BIT(x) macro to shorten constant
From: |
Gerd Hoffmann |
Subject: |
[PULL 17/21] sm501: Use BIT(x) macro to shorten constant |
Date: |
Thu, 28 May 2020 14:36:05 +0200 |
From: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id:
124bf5de8d7cf503b32b377d0445029a76bfbd49.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/sm501.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index f42d05e1e4b2..97660090bb20 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -701,7 +701,7 @@ static void sm501_2d_operation(SM501State *s)
{
/* obtain operation parameters */
int cmd = (s->twoD_control >> 16) & 0x1F;
- int rtl = s->twoD_control & 0x8000000;
+ int rtl = s->twoD_control & BIT(27);
int src_x = (s->twoD_source >> 16) & 0x01FFF;
int src_y = s->twoD_source & 0xFFFF;
int dst_x = (s->twoD_destination >> 16) & 0x01FFF;
@@ -751,8 +751,7 @@ static void sm501_2d_operation(SM501State *s)
}
}
- if ((s->twoD_source_base & 0x08000000) ||
- (s->twoD_destination_base & 0x08000000)) {
+ if (s->twoD_source_base & BIT(27) || s->twoD_destination_base & BIT(27)) {
qemu_log_mask(LOG_UNIMP, "sm501: only local memory is supported.\n");
return;
}
--
2.18.4
- [PULL 08/21] hw/display/dpcd: Convert debug printf()s to trace events, (continued)
- [PULL 08/21] hw/display/dpcd: Convert debug printf()s to trace events, Gerd Hoffmann, 2020/05/28
- [PULL 19/21] sm501: Replace hand written implementation with pixman where possible, Gerd Hoffmann, 2020/05/28
- [PULL 02/21] hw/display/cg3: Convert debug printf()s to trace events, Gerd Hoffmann, 2020/05/28
- [PULL 13/21] hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP), Gerd Hoffmann, 2020/05/28
- [PULL 15/21] sm501: Convert printf + abort to qemu_log_mask, Gerd Hoffmann, 2020/05/28
- [PULL 06/21] hw/display/cirrus_vga: Convert debug printf() to trace event, Gerd Hoffmann, 2020/05/28
- [PULL 16/21] sm501: Shorten long variable names in sm501_2d_operation, Gerd Hoffmann, 2020/05/28
- [PULL 21/21] sm501: Remove obsolete changelog and todo comment, Gerd Hoffmann, 2020/05/28
- [PULL 10/21] hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR), Gerd Hoffmann, 2020/05/28
- [PULL 20/21] sm501: Optimize small overlapping blits, Gerd Hoffmann, 2020/05/28
- [PULL 17/21] sm501: Use BIT(x) macro to shorten constant,
Gerd Hoffmann <=
- [PULL 12/21] hw/display/exynos4210_fimd: Use qemu_log_mask(GUEST_ERROR), Gerd Hoffmann, 2020/05/28
- [PULL 11/21] hw/display/vmware_vga: Let the PCI device own its I/O MemoryRegion, Gerd Hoffmann, 2020/05/28
- [PULL 18/21] sm501: Clean up local variables in sm501_2d_operation, Gerd Hoffmann, 2020/05/28
- [PULL 14/21] hw/display/pxa2xx_lcd: Replace printf() call by qemu_log_mask(), Gerd Hoffmann, 2020/05/28
- [PULL 07/21] hw/display/dpcd: Fix memory region size, Gerd Hoffmann, 2020/05/28
- [PULL 09/21] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report(), Gerd Hoffmann, 2020/05/28
- [PULL 01/21] hw/display/edid: Add missing 'qdev-properties.h' header, Gerd Hoffmann, 2020/05/28
- [PULL 05/21] hw/display/cirrus_vga: Use qemu_log_mask(ERROR) instead of debug printf, Gerd Hoffmann, 2020/05/28
- Re: [PULL 00/21] Vga 20200528 patches, no-reply, 2020/05/28
- Re: [PULL 00/21] Vga 20200528 patches, Peter Maydell, 2020/05/29