[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/22] adb: coding style update to fix checkpatch errors
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 01/22] adb: coding style update to fix checkpatch errors |
Date: |
Sun, 14 Jun 2020 18:49:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 6/14/20 4:28 PM, Mark Cave-Ayland wrote:
> 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>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> 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);
>
- [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, 2020/06/14
- Re: [PATCH 01/22] adb: coding style update to fix checkpatch errors,
Philippe Mathieu-Daudé <=
- [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
- [PATCH 09/22] pmu: convert to use ADBBusState internal autopoll variables, Mark Cave-Ayland, 2020/06/14