From nobody Mon Feb 9 16:51:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674485893; cv=none; d=zohomail.com; s=zohoarc; b=a18u6jN6FUZhmJ2iRuq585koC5ca55E1IMegmLDvv3JuEYAzc3TQvrHWt4nlMAasCvT6GrGhCKWjUopceouNL98xm3okTdGk7jC7ebOtm80RONepTks+dmtgXFGDpWkcq69hOIy4wNjpf8FLMf0RS/Anpc0CRt/aJdYihCa7gdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674485893; h=Content-Type:Content-Transfer-Encoding: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=DvuB0kXnuLtW87AuInoML5l2UjLEW2uxM7uwixiWgvg=; b=m5eM7wk0FkDmVqtDzuIkfJNZoPneKNPAOMKtJrTik2zYIAkFuSWw2WJVPsCkBtC6flRmu6YFtL1s44QoeaSpO6heEHGTLnzGscdAxZbwZD9wHm8ElajyoUc5pugFhTp3HWEAma+S3y3f+GxqmRngzcStiMVn1AVsMMYdyx0RbOM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1674485893592218.83033817688113; Mon, 23 Jan 2023 06:58:13 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-486-APzquN2dOOalwJgAdnTPFw-1; Mon, 23 Jan 2023 09:58:09 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8D981C04B6C; Mon, 23 Jan 2023 14:58:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C55AB140EBF4; Mon, 23 Jan 2023 14:58:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D717D19465A8; Mon, 23 Jan 2023 14:58:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2279F194658D for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C781D492B02; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFC60492B03 for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A29D3101A52E for ; Mon, 23 Jan 2023 14:58:01 +0000 (UTC) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-315-v6GDuk4DN6iVrTecKiaAAw-1; Mon, 23 Jan 2023 09:57:59 -0500 Received: by mail-ej1-f72.google.com with SMTP id hp2-20020a1709073e0200b0084d47e3fe82so7831779ejc.8 for ; Mon, 23 Jan 2023 06:57:59 -0800 (PST) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id o16-20020a170906769000b0087758f5ecd1sm8470848ejm.194.2023.01.23.06.57.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 06:57:57 -0800 (PST) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 864F6D1AD9BD for ; Mon, 23 Jan 2023 15:57:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674485892; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DvuB0kXnuLtW87AuInoML5l2UjLEW2uxM7uwixiWgvg=; b=A1QnQJdikdutKtMZEa5WU3WaG5TsOAcAle1+3fVGPTe/NdYwpJCG9wSwUhEfMyO3FqR8GS OVqlsIXeoWjumq5FynjJ9Aor8cFKpvpRe7E95Tj7Nk3xcp4gekE2Iq9WzO+zRoIg3zntTy T4XwL+uX1YcO4+oh9naBuT6DNPc6Qew= X-MC-Unique: APzquN2dOOalwJgAdnTPFw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: v6GDuk4DN6iVrTecKiaAAw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DvuB0kXnuLtW87AuInoML5l2UjLEW2uxM7uwixiWgvg=; b=JE9HYbyLWYOBFLyf8t0bBkbFaVNJxohjZWom940VSTvJFCToQ6QFzW4AwFKFot5Bk8 LaE6weYcOqoeaQuzC4wpgPl/E54dBIVmAdExVMhG+WC0w3n3VDemd5TeE2qaXc2i50w/ AIjlXcwcpFvNYy9aIb77OfcOPqR2j//MIftIrBa3ZRNrdF0Yvb+SnzAYm1rRTx1AgBvT aAVvpprsEJD09md/yBx/MUUNbDRdnWLyF/AYAAAdduNEwI8t+rfg1Vi7bWflXMC1N8Qe VIMz1OZcWPAXluionmE6M2j2ILj8WaQVvp7BR7gMCgX/9vPgrzTfWCOjP5qMgyyCSr7e G0dQ== X-Gm-Message-State: AFqh2kpHaiaAD8o5seDifV0mAsYC/0PcokE4/Q7ZyEqsM+IWkQqu3t3y 6oWjHnScA5mu4H07tLC773+AEKo2xFmayoMxTFDgU4X5rWKSF2fbQXaAFf/Raz5LuqzI0mA7SlS ORg5y45R+BwwrTF9NSme2zrIGA3GBSNJjViH6mcJFLRgsrE6N/6YbnWStlVUKQLFVMfEChcI= X-Received: by 2002:a17:906:1798:b0:84d:43e4:3633 with SMTP id t24-20020a170906179800b0084d43e43633mr24446525eje.36.1674485878686; Mon, 23 Jan 2023 06:57:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXtmsZprfqvmqVkv3VA8RJyX7iIlCvJOK9wMAX4Qib5anM/9pduAM0c7G9VL9sSLi+HBXvxcJw== X-Received: by 2002:a17:906:1798:b0:84d:43e4:3633 with SMTP id t24-20020a170906179800b0084d43e43633mr24446506eje.36.1674485878447; Mon, 23 Jan 2023 06:57:58 -0800 (PST) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH 1/7] Avoid unnecessary nesting Date: Mon, 23 Jan 2023 15:57:50 +0100 Message-Id: <7d02f55d8f55f7bc13dade83975fc329ea947d17.1674485748.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674485894403100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Martin Kletzander --- src/qemu/qemu_hotplug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 026e1ee5add7..1fa3cc3ea9b1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2938,17 +2938,17 @@ qemuDomainAttachWatchdog(virDomainObj *vm, =20 qemuAssignDeviceWatchdogAlias(watchdog); =20 - if (watchdog->model =3D=3D VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { - if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) - goto cleanup; - releaseAddress =3D true; - } else { + if (watchdog->model !=3D VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("hotplug of watchdog of model %s is not supported= "), virDomainWatchdogModelTypeToString(watchdog->model)= ); goto cleanup; } =20 + if (qemuDomainEnsurePCIAddress(vm, &dev) < 0) + goto cleanup; + releaseAddress =3D true; + if (!(props =3D qemuBuildWatchdogDevProps(vm->def, watchdog))) goto cleanup; =20 --=20 2.39.1