From patchwork Tue Mar 17 09:39:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 11442363 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E410492A for ; Tue, 17 Mar 2020 09:59:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8375C205ED for ; Tue, 17 Mar 2020 09:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8375C205ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=eik.bme.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE901-0001wV-NF for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Mar 2020 05:59:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36745) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE8yw-0008Ip-Qc for qemu-devel@nongnu.org; Tue, 17 Mar 2020 05:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE8yu-0006Wr-S3 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 05:57:54 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:31342) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jE8ys-0005zv-95; Tue, 17 Mar 2020 05:57:50 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 847BA747E15; Tue, 17 Mar 2020 10:57:44 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 3B8A4747E0F; Tue, 17 Mar 2020 10:57:44 +0100 (CET) Message-Id: <59c6743ce76b1b0fc36d048968760f130ebcf5a3.1584437958.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH v2 4/7] hw/ide/pci.c: Coding style update to fix checkpatch errors Date: Tue, 17 Mar 2020 10:39:17 +0100 MIME-Version: 1.0 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , Markus Armbruster , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster --- 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]); + } } }