[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/22] adb: coding style update to fix checkpatch errors
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 01/22] adb: coding style update to fix checkpatch errors |
Date: |
Sun, 14 Jun 2020 15:28:19 +0100 |
This will help ensure that style guidelines are being maintained during
subsequent changes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/adb.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/input/adb.c b/hw/input/adb.c
index b1ac4a3852..bf1bc30d19 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -44,14 +44,14 @@ int adb_request(ADBBusState *s, uint8_t *obuf, const
uint8_t *buf, int len)
cmd = buf[0] & 0xf;
if (cmd == ADB_BUSRESET) {
- for(i = 0; i < s->nb_devices; i++) {
+ for (i = 0; i < s->nb_devices; i++) {
d = s->devices[i];
adb_device_reset(d);
}
return 0;
}
devaddr = buf[0] >> 4;
- for(i = 0; i < s->nb_devices; i++) {
+ for (i = 0; i < s->nb_devices; i++) {
d = s->devices[i];
if (d->devaddr == devaddr) {
ADBDeviceClass *adc = ADB_DEVICE_GET_CLASS(d);
@@ -69,9 +69,10 @@ int adb_poll(ADBBusState *s, uint8_t *obuf, uint16_t
poll_mask)
uint8_t buf[1];
olen = 0;
- for(i = 0; i < s->nb_devices; i++) {
- if (s->poll_index >= s->nb_devices)
+ for (i = 0; i < s->nb_devices; i++) {
+ if (s->poll_index >= s->nb_devices) {
s->poll_index = 0;
+ }
d = s->devices[s->poll_index];
if ((1 << d->devaddr) & poll_mask) {
buf[0] = ADB_READREG | (d->devaddr << 4);
--
2.20.1
- [PATCH 00/22] ADB: fix autopoll issues and rework mac_via state machine, Mark Cave-Ayland, 2020/06/14
- [PATCH 01/22] adb: coding style update to fix checkpatch errors,
Mark Cave-Ayland <=
- [PATCH 02/22] adb: fix adb-mouse read length and revert disable-reg3-direct-writes workaround, Mark Cave-Ayland, 2020/06/14
- [PATCH 03/22] cuda: convert ADB autopoll timer from ns to ms, Mark Cave-Ayland, 2020/06/14
- [PATCH 04/22] pmu: fix duplicate autopoll mask variable, Mark Cave-Ayland, 2020/06/14
- [PATCH 05/22] pmu: honour autopoll_rate_ms when rearming the ADB autopoll timer, Mark Cave-Ayland, 2020/06/14
- [PATCH 06/22] adb: introduce realize/unrealize and VMStateDescription for ADB bus, Mark Cave-Ayland, 2020/06/14
- [PATCH 07/22] adb: create autopoll variables directly within ADBBusState, Mark Cave-Ayland, 2020/06/14
- [PATCH 08/22] cuda: convert to use ADBBusState internal autopoll variables, Mark Cave-Ayland, 2020/06/14