[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/55] pl050: checkpatch fixes
From: |
Mark Cave-Ayland |
Subject: |
[PULL 14/55] pl050: checkpatch fixes |
Date: |
Sun, 26 Jun 2022 18:44:50 +0100 |
This patch also includes a couple of minor spacing updates.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220624134109.881989-15-mark.cave-ayland@ilande.co.uk>
---
hw/input/pl050.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index d279b6c148..889a0674d3 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -53,8 +53,9 @@ static const VMStateDescription vmstate_pl050 = {
#define PL050_KMIC (1 << 1)
#define PL050_KMID (1 << 0)
-static const unsigned char pl050_id[] =
-{ 0x50, 0x10, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1 };
+static const unsigned char pl050_id[] = {
+ 0x50, 0x10, 0x04, 0x00, 0x0d, 0xf0, 0x05, 0xb1
+};
static void pl050_update(void *opaque, int level)
{
@@ -71,8 +72,10 @@ static uint64_t pl050_read(void *opaque, hwaddr offset,
unsigned size)
{
PL050State *s = (PL050State *)opaque;
- if (offset >= 0xfe0 && offset < 0x1000)
+
+ if (offset >= 0xfe0 && offset < 0x1000) {
return pl050_id[(offset - 0xfe0) >> 2];
+ }
switch (offset >> 2) {
case 0: /* KMICR */
@@ -88,16 +91,19 @@ static uint64_t pl050_read(void *opaque, hwaddr offset,
val = (val ^ (val >> 1)) & 1;
stat = PL050_TXEMPTY;
- if (val)
+ if (val) {
stat |= PL050_RXPARITY;
- if (s->pending)
+ }
+ if (s->pending) {
stat |= PL050_RXFULL;
+ }
return stat;
}
case 2: /* KMIDATA */
- if (s->pending)
+ if (s->pending) {
s->last = ps2_read_data(s->dev);
+ }
return s->last;
case 3: /* KMICLKDIV */
return s->clk;
@@ -114,6 +120,7 @@ static void pl050_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
PL050State *s = (PL050State *)opaque;
+
switch (offset >> 2) {
case 0: /* KMICR */
s->cr = value;
--
2.30.2
- [PULL 05/55] ps2: move QOM type definitions from ps2.c to ps2.h, (continued)
- [PULL 05/55] ps2: move QOM type definitions from ps2.c to ps2.h, Mark Cave-Ayland, 2022/06/26
- [PULL 02/55] ps2: QOMify PS2State, Mark Cave-Ayland, 2022/06/26
- [PULL 06/55] ps2: improve function prototypes in ps2.c and ps2.h, Mark Cave-Ayland, 2022/06/26
- [PULL 07/55] ps2: introduce PS2DeviceClass, Mark Cave-Ayland, 2022/06/26
- [PULL 08/55] ps2: implement ps2_reset() for the PS2_DEVICE QOM type based upon ps2_common_reset(), Mark Cave-Ayland, 2022/06/26
- [PULL 09/55] ps2: remove duplicate setting of scancode_set in ps2_kbd_init(), Mark Cave-Ayland, 2022/06/26
- [PULL 10/55] ps2: implement ps2_kbd_realize() and use it to register ps2_keyboard_handler, Mark Cave-Ayland, 2022/06/26
- [PULL 11/55] ps2: implement ps2_mouse_realize() and use it to register ps2_mouse_handler, Mark Cave-Ayland, 2022/06/26
- [PULL 12/55] ps2: don't use vmstate_register() in ps2_kbd_init(), Mark Cave-Ayland, 2022/06/26
- [PULL 13/55] ps2: don't use vmstate_register() in ps2_mouse_init(), Mark Cave-Ayland, 2022/06/26
- [PULL 14/55] pl050: checkpatch fixes,
Mark Cave-Ayland <=
- [PULL 15/55] pl050: split pl050_update_irq() into separate pl050_set_irq() and pl050_update_irq() functions, Mark Cave-Ayland, 2022/06/26
- [PULL 17/55] lasips2: rename ps2dev_update_irq() to lasips2_port_set_irq(), Mark Cave-Ayland, 2022/06/26
- [PULL 16/55] lasips2: spacing fixes, Mark Cave-Ayland, 2022/06/26
- [PULL 20/55] pckbd: move ISAKBDState from pckbd.c to i8042.h, Mark Cave-Ayland, 2022/06/26
- [PULL 19/55] pckbd: move KBDState from pckbd.c to i8042.h, Mark Cave-Ayland, 2022/06/26
- [PULL 18/55] pckbd: checkpatch fixes, Mark Cave-Ayland, 2022/06/26
- [PULL 21/55] pckbd: introduce new I8042_MMIO QOM type, Mark Cave-Ayland, 2022/06/26
- [PULL 24/55] pckbd: add size qdev property to I8042_MMIO device, Mark Cave-Ayland, 2022/06/26
- [PULL 25/55] pckbd: implement i8042_mmio_realize() function, Mark Cave-Ayland, 2022/06/26
- [PULL 27/55] pckbd: alter i8042_mm_init() to return a I8042_MMIO device, Mark Cave-Ayland, 2022/06/26