From nobody Fri Nov 14 03:45:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584488183; cv=none; d=zohomail.com; s=zohoarc; b=a0LqR/7w8HE2X7urFiE+xMniX2IF3hhUxdWRtKXkcraFbt1Uxh6dMug9Cv9PZY6VNjpZlOw9ZV2DiJAZ3eXhgH6T2qJ69dcY4lToeVavhfvocdZPrEesB8vloOad1jq9ChKgLgkvUS1KIpnyouShle1VYVZDCJ5xrcw+5730dhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584488183; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qdeFAM6x9SD6qY2ZcCKAngQF5k3SDotf+6TE0F1uUh4=; b=aHkdgVX1Y+mwqgEjl8gROfnVVCEdf92hK9ymGzTbIo4fdCxFdwOPBZ4z/T4xQ+C0LKt/VT4KoZrtLGKsevw5NhAFEGFFP0NuyHQEJxqQTT+yyUekLXRrCF2/kMPJEP58eKIxos6McBSYOx4C8LkGqOCA1AXd1wJQ6+Dny/SOf2k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158448818360338.901446225009295; Tue, 17 Mar 2020 16:36:23 -0700 (PDT) Received: from localhost ([::1]:43182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELl0-0002YR-IN for importer@patchew.org; Tue, 17 Mar 2020 19:36:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54802) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELab-0002Uj-HI for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELaa-0002Ul-BY for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:37 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:29097) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELaa-0002Rl-6R for qemu-devel@nongnu.org; Tue, 17 Mar 2020 19:25:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-RFSAdMHcO2en35qpLXKCMA-1; Tue, 17 Mar 2020 19:25:32 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92E4D180455E; Tue, 17 Mar 2020 23:25:29 +0000 (UTC) Received: from probe.redhat.com (ovpn-112-191.rdu2.redhat.com [10.10.112.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49B5060BE0; Tue, 17 Mar 2020 23:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584487535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qdeFAM6x9SD6qY2ZcCKAngQF5k3SDotf+6TE0F1uUh4=; b=edXQqhbNF8hjgm7lKP6qg02md9rJX62l/kjq/F/02n0qwogpSkOimv2MxlBpJNODiOwak+ hXKxycpSlFBSt8kKZMU8M2uCbSZUqIX3EuQFgZdCoj2v6V02U1v2m5TgyLxVVwdssRKfeR 51pc8IWE0GmchahLIlCd1EuiEw5V6Vc= X-MC-Unique: RFSAdMHcO2en35qpLXKCMA-1 From: John Snow To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors Date: Tue, 17 Mar 2020 19:23:26 -0400 Message-Id: <20200317232329.22362-18-jsnow@redhat.com> In-Reply-To: <20200317232329.22362-1-jsnow@redhat.com> References: <20200317232329.22362-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 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: "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-block@nongnu.org, Helge Deller , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , John Snow , David Gibson , Kevin Wolf , Max Reitz , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan 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=C3=A9 Reviewed-by: Markus Armbruster Message-id: 0d50336ab26a56240c8c17ca1ec6135a4092fcc9.1584457537.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- 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; =20 for (i =3D 0; i < 4; i++) { - if (hd_table[i] =3D=3D 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]); + } } } =20 --=20 2.21.1