From nobody Sun Apr 28 19:50:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1658234870; cv=none; d=zohomail.com; s=zohoarc; b=DwQIyhWFyp6HbrZ5Txn3nBIcLDm4TXE6JSHkHmcNcVPK/Kjyh/CmanklmTZnA2j/DVvQK3/nSCsMrKTRd/iYBlVlCyx/3g/5cZ8kFSJ/p8MHiJjUUrvI1WhAg96dZ1kdAOOxIf4z6i3YHtJuzxonJv3wjJ+r+4J+PEpKBOfG2aY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658234870; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=55CcR56CJbVnqIZ+1OIQmKG3Z9WKTVtHGyg9OBAJnC8=; b=NADnjfqfE/LYOVfE2TIYYy4aesknX88Gg0ivzhov+/rppUJKHDYLjli+RfdfKGJa7CS5tvCLAb6iBuCLk82f7mSfo2tgs+Z0RnAEeoQVdcSP2WHTSEa93YssMLwWv+mk9uQHpjCLo3rhVSeoMz5fWFNPBu2CAmafajTe9LqusFI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 165823487025557.06139367047194; Tue, 19 Jul 2022 05:47:50 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-rSZvOL1NPIWm4xh9BcjLlQ-1; Tue, 19 Jul 2022 08:47:46 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58227811E7A; Tue, 19 Jul 2022 12:47:43 +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 DE4141121315; Tue, 19 Jul 2022 12:47:42 +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 BE26B1947070; Tue, 19 Jul 2022 12:47:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 534801945DA7 for ; Tue, 19 Jul 2022 12:47:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2D4D7492CA4; Tue, 19 Jul 2022 12:47:41 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.34.245.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCAAB492C3B for ; Tue, 19 Jul 2022 12:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658234869; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=55CcR56CJbVnqIZ+1OIQmKG3Z9WKTVtHGyg9OBAJnC8=; b=ZXuwjeUi/Q92mkDdTSK7k5dKxEpzy1peFlzwawHM4MNwG+Ppg4cpxY0+jng2NHyv75y3Tc KgsgyLuKriXQCF2BwU2bjmGhGYI6zeLno/eYAtvLeMzdrO5RYoQ4c56ztunEg7cOxQDxiH BBsEH7BhQ/oMQ/eYxEyvDrEW6wnteuE= X-MC-Unique: rSZvOL1NPIWm4xh9BcjLlQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] qemu: domainjob: remove async variable from qemuDomainObjBeginJobInternal() Date: Tue, 19 Jul 2022 14:47:28 +0200 Message-Id: <04336084729f064571c4098d47f627ad5c3abc72.1658234676.git.khanicov@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1658234872636100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch removes variable 'async', which is used only once, and replaces it with direct comparison with an enum member. Signed-off-by: Kristina Hanicova Reviewed-by: Michal Privoznik --- src/qemu/qemu_domainjob.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c index 1f6d976558..7c6b697959 100644 --- a/src/qemu/qemu_domainjob.c +++ b/src/qemu/qemu_domainjob.c @@ -875,7 +875,6 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver, unsigned long long now; unsigned long long then; bool nested =3D job =3D=3D VIR_JOB_ASYNC_NESTED; - bool async =3D job =3D=3D VIR_JOB_ASYNC; g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); const char *blocker =3D NULL; const char *agentBlocker =3D NULL; @@ -903,7 +902,8 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver, then =3D now + QEMU_JOB_WAIT_TIME; =20 retry: - if ((!async && job !=3D VIR_JOB_DESTROY) && + if (job !=3D VIR_JOB_ASYNC && + job !=3D VIR_JOB_DESTROY && cfg->maxQueuedJobs && priv->job.jobsQueued > cfg->maxQueuedJobs) { goto error; --=20 2.35.3