qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	hpoussin@reactos.org,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>,
	Artyom Tarasenko <atar4qemu@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors
Date: Sat, 14 Mar 2020 23:05:18 +0100	[thread overview]
Message-ID: <f0a5e41a-72c8-084f-8374-6bebebf216e2@redhat.com> (raw)
In-Reply-To: <34bdee6ddddd7943b9a68547f46c76f30b9a7e75.1584134074.git.balaton@eik.bme.hu>

On 3/13/20 10:14 PM, BALATON Zoltan wrote:
> Spaces are required around a + operator and if statements should have
> braces even for single line. Also make it simpler by reversing the
> condition instead of breaking the loop.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   hw/ide/pci.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/ide/pci.c b/hw/ide/pci.c
> index 4fc76c5225..e0c84392e2 100644
> --- a/hw/ide/pci.c
> +++ b/hw/ide/pci.c
> @@ -485,9 +485,9 @@ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table)
>       int i;
>   
>       for (i = 0; i < 4; i++) {
> -        if (hd_table[i] == NULL)
> -            continue;
> -        ide_create_drive(d->bus+bus[i], unit[i], hd_table[i]);
> +        if (hd_table[i]) {
> +            ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
> +        }
>       }
>   }
>   
> 



  reply	other threads:[~2020-03-14 22:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 21:14 [PATCH 0/8] Misc hw/ide legacy clean up BALATON Zoltan
2020-03-13 21:14 ` [PATCH 1/8] hw/ide: Get rid of piix3_init functions BALATON Zoltan
2020-03-14 21:59   ` Philippe Mathieu-Daudé
2020-03-16  6:34   ` Markus Armbruster
2020-03-16 12:40     ` BALATON Zoltan
2020-03-13 21:14 ` [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header BALATON Zoltan
2020-03-16  6:53   ` Markus Armbruster
2020-03-16  8:23     ` Philippe Mathieu-Daudé
2020-03-13 21:14 ` [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs() BALATON Zoltan
2020-03-13 22:16   ` BALATON Zoltan
2020-03-14 10:01     ` Paolo Bonzini
2020-03-16  6:23       ` Markus Armbruster
2020-03-16  8:30         ` Philippe Mathieu-Daudé
2020-03-16 14:03           ` Markus Armbruster
2020-03-13 21:14 ` [PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h BALATON Zoltan
2020-03-14 22:03   ` Philippe Mathieu-Daudé
2020-03-13 21:14 ` [PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h BALATON Zoltan
2020-03-13 21:14 ` [PATCH 2/8] hw/ide: Get rid of piix4_init function BALATON Zoltan
2020-03-14 22:02   ` Philippe Mathieu-Daudé
2020-03-14 23:52     ` BALATON Zoltan
2020-03-15  5:35   ` Michael S. Tsirkin
2020-03-15 12:08     ` BALATON Zoltan
2020-03-13 21:14 ` [PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors BALATON Zoltan
2020-03-14 22:05   ` Philippe Mathieu-Daudé [this message]
2020-03-13 21:14 ` [PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h BALATON Zoltan
2020-03-14 11:45 ` [PATCH 0/8] Misc hw/ide legacy clean up Mark Cave-Ayland
2020-03-14 11:54   ` Paolo Bonzini
2020-03-16  6:58 ` Markus Armbruster
2020-03-16 13:06   ` BALATON Zoltan
2020-03-16 13:41     ` BALATON Zoltan
2020-03-17  4:25       ` John Snow
2020-03-16 12:55 ` [PATCH v2] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h BALATON Zoltan
2020-03-16 13:35 ` [PATCH v2] hw/ide: Do ide_drive_get() within pci_ide_create_devs() BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0a5e41a-72c8-084f-8374-6bebebf216e2@redhat.com \
    --to=philmd@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=atar4qemu@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=ehabkost@redhat.com \
    --cc=hpoussin@reactos.org \
    --cc=jsnow@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).