[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] hw/display/pxa2xx: Apply whitespace-only coding style fixes
From: |
Peter Maydell |
Subject: |
[PATCH 8/9] hw/display/pxa2xx: Apply whitespace-only coding style fixes to template header |
Date: |
Thu, 11 Feb 2021 14:15:14 +0000 |
We're about to move code from the template header into pxa2xx_lcd.c.
Before doing that, make coding style fixes so checkpatch doesn't
complain about the patch which moves the code. This commit is
whitespace changes only:
* avoid hard-coded tabs
* fix ident on function prototypes
* no newline before open brace on array definitions
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/display/pxa2xx_template.h | 66 +++++++++++++++++-------------------
1 file changed, 32 insertions(+), 34 deletions(-)
diff --git a/hw/display/pxa2xx_template.h b/hw/display/pxa2xx_template.h
index 1c13d3ac007..d91407592d3 100644
--- a/hw/display/pxa2xx_template.h
+++ b/hw/display/pxa2xx_template.h
@@ -17,20 +17,20 @@
} while (0)
#ifdef HOST_WORDS_BIGENDIAN
-# define SWAP_WORDS 1
+# define SWAP_WORDS 1
#endif
-#define FN_2(x) FN(x + 1) FN(x)
-#define FN_4(x) FN_2(x + 2) FN_2(x)
+#define FN_2(x) FN(x + 1) FN(x)
+#define FN_4(x) FN_2(x + 2) FN_2(x)
-static void pxa2xx_draw_line2(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line2(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t *palette = opaque;
uint32_t data;
while (width > 0) {
data = *(uint32_t *) src;
-#define FN(x) COPY_PIXEL(dest, palette[(data >> ((x) * 2)) & 3]);
+#define FN(x) COPY_PIXEL(dest, palette[(data >> ((x) * 2)) & 3]);
#ifdef SWAP_WORDS
FN_4(12)
FN_4(8)
@@ -48,14 +48,14 @@ static void pxa2xx_draw_line2(void *opaque,
}
}
-static void pxa2xx_draw_line4(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line4(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t *palette = opaque;
uint32_t data;
while (width > 0) {
data = *(uint32_t *) src;
-#define FN(x) COPY_PIXEL(dest, palette[(data >> ((x) * 4)) & 0xf]);
+#define FN(x) COPY_PIXEL(dest, palette[(data >> ((x) * 4)) & 0xf]);
#ifdef SWAP_WORDS
FN_2(6)
FN_2(4)
@@ -73,14 +73,14 @@ static void pxa2xx_draw_line4(void *opaque,
}
}
-static void pxa2xx_draw_line8(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line8(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t *palette = opaque;
uint32_t data;
while (width > 0) {
data = *(uint32_t *) src;
-#define FN(x) COPY_PIXEL(dest, palette[(data >> (x)) & 0xff]);
+#define FN(x) COPY_PIXEL(dest, palette[(data >> (x)) & 0xff]);
#ifdef SWAP_WORDS
FN(24)
FN(16)
@@ -98,8 +98,8 @@ static void pxa2xx_draw_line8(void *opaque,
}
}
-static void pxa2xx_draw_line16(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line16(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -126,8 +126,8 @@ static void pxa2xx_draw_line16(void *opaque,
}
}
-static void pxa2xx_draw_line16t(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line16t(void *opaque, uint8_t *dest, const uint8_t
*src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -164,8 +164,8 @@ static void pxa2xx_draw_line16t(void *opaque,
}
}
-static void pxa2xx_draw_line18(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line18(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -186,8 +186,8 @@ static void pxa2xx_draw_line18(void *opaque,
}
/* The wicked packed format */
-static void pxa2xx_draw_line18p(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line18p(void *opaque, uint8_t *dest, const uint8_t
*src,
+ int width, int deststep)
{
uint32_t data[3];
unsigned int r, g, b;
@@ -234,8 +234,8 @@ static void pxa2xx_draw_line18p(void *opaque,
}
}
-static void pxa2xx_draw_line19(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line19(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -261,8 +261,8 @@ static void pxa2xx_draw_line19(void *opaque,
}
/* The wicked packed format */
-static void pxa2xx_draw_line19p(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line19p(void *opaque, uint8_t *dest, const uint8_t
*src,
+ int width, int deststep)
{
uint32_t data[3];
unsigned int r, g, b;
@@ -329,8 +329,8 @@ static void pxa2xx_draw_line19p(void *opaque,
}
}
-static void pxa2xx_draw_line24(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line24(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -350,8 +350,8 @@ static void pxa2xx_draw_line24(void *opaque,
}
}
-static void pxa2xx_draw_line24t(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line24t(void *opaque, uint8_t *dest, const uint8_t
*src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -376,8 +376,8 @@ static void pxa2xx_draw_line24t(void *opaque,
}
}
-static void pxa2xx_draw_line25(void *opaque,
- uint8_t *dest, const uint8_t *src, int width, int deststep)
+static void pxa2xx_draw_line25(void *opaque, uint8_t *dest, const uint8_t *src,
+ int width, int deststep)
{
uint32_t data;
unsigned int r, g, b;
@@ -403,8 +403,7 @@ static void pxa2xx_draw_line25(void *opaque,
}
/* Overlay planes disabled, no transparency */
-static drawfn pxa2xx_draw_fn_32[16] =
-{
+static drawfn pxa2xx_draw_fn_32[16] = {
[0 ... 0xf] = NULL,
[pxa_lcdc_2bpp] = pxa2xx_draw_line2,
[pxa_lcdc_4bpp] = pxa2xx_draw_line4,
@@ -416,8 +415,7 @@ static drawfn pxa2xx_draw_fn_32[16] =
};
/* Overlay planes enabled, transparency used */
-static drawfn pxa2xx_draw_fn_32t[16] =
-{
+static drawfn pxa2xx_draw_fn_32t[16] = {
[0 ... 0xf] = NULL,
[pxa_lcdc_4bpp] = pxa2xx_draw_line4,
[pxa_lcdc_8bpp] = pxa2xx_draw_line8,
--
2.20.1
- [PATCH 0/9] hw/display/pl110, pxa2xx_lcd: Tidy up template headers, Peter Maydell, 2021/02/11
- [PATCH 1/9] hw/display/pl110: Remove dead code for non-32-bpp surfaces, Peter Maydell, 2021/02/11
- [PATCH 2/9] hw/display/pl110: Pull included-once parts of template header into pl110.c, Peter Maydell, 2021/02/11
- [PATCH 3/9] hw/display/pl110: Remove use of BITS from pl110_template.h, Peter Maydell, 2021/02/11
- [PATCH 7/9] hw/display/pxa2xx: Apply brace-related coding style fixes to template header, Peter Maydell, 2021/02/11
- [PATCH 4/9] hw/display/pxa2xx_lcd: Remove dead code for non-32-bpp surfaces, Peter Maydell, 2021/02/11
- [PATCH 5/9] hw/display/pxa2xx_lcd: Remove dest_width state field, Peter Maydell, 2021/02/11
- [PATCH 6/9] hw/display/pxa2xx: Remove use of BITS in pxa2xx_template.h, Peter Maydell, 2021/02/11
- [PATCH 8/9] hw/display/pxa2xx: Apply whitespace-only coding style fixes to template header,
Peter Maydell <=
- [PATCH 9/9] hw/display/pxa2xx: Inline template header, Peter Maydell, 2021/02/11
- Message not available