From nobody Sun Feb 8 21:48:38 2026 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=1642096145; cv=none; d=zohomail.com; s=zohoarc; b=GEvInDsAh2FA0bBr+T8JHWncqig47mV2U/2awfXiqaPxmXw+HkbqkbYiuvksVZ1Rq+cqou/d/S87yVC0+xeIj0X40Pz9qSyWG3EPezwo+TRXuonq5TU5bFPmUPGNymW8ajyPj54tpt0Wb6es5bvs+u9d1OrgGpCBeL4qotxTxr0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642096145; 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=QZQALEauu514qRQTZ0YJWx6RQpT2wajAN+Mxrq3s7fY=; b=K1rr0K4NHw9M0Mj+INtqixSzWj95+5QHlAGzFZkTd0HxOqiIoYh6owKItdeDPsz4KHPckX/LdNwdIrryCponE0+F+C2FDTM87XuNVijMZow5X6Aq4wyCYiPn60DCxXsERVlp+h/FCB+T2LjFil+gb/Vbk5cbOtoWWpGof0xoLeo= 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 164209614596062.72070518768203; Thu, 13 Jan 2022 09:49:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-533-vPo94aTVOGORoFYUT0El6Q-1; Thu, 13 Jan 2022 12:48:19 -0500 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 90DF681EE61; Thu, 13 Jan 2022 17:48:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DD237EBF5; Thu, 13 Jan 2022 17:48:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 396874A7C8; Thu, 13 Jan 2022 17:48:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20DHm1XO005021 for ; Thu, 13 Jan 2022 12:48:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 29AD8348E0; Thu, 13 Jan 2022 17:48:01 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A61B034D38 for ; Thu, 13 Jan 2022 17:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642096145; 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=QZQALEauu514qRQTZ0YJWx6RQpT2wajAN+Mxrq3s7fY=; b=TrTbIfG4KqHH+cbSMylg+7NQbiWaU0+spV64w4L7ryvZkoZ1TgyrrjvvXCYUNK96k33/m8 lzYhTgd8pK8BnJvPsfLSGWV6Gmt1iXZ5WQ5UWcV0pwG2gh7Y454GK6Wz+mX9QhO39eJE/7 Z6IcMDgJxXzv0XneFpofZWDeQGYWTMM= X-MC-Unique: vPo94aTVOGORoFYUT0El6Q-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 7/7] qemu: simplify qemuProcessSetupRawIO Date: Thu, 13 Jan 2022 18:47:42 +0100 Message-Id: <3c3111ab997749907d1e128a1d8098848b414912.1642095763.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642096148277100001 Remove the now unused 'driver' parameter, as well as the pointless if (ret =3D=3D 0) comparison which is always true after removing the cleanup label. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6203efef3a..7ff4dc1835 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5022,8 +5022,7 @@ qemuProcessSetupGraphics(virQEMUDriver *driver, =20 =20 static int -qemuProcessSetupRawIO(virQEMUDriver *driver G_GNUC_UNUSED, - virDomainObj *vm, +qemuProcessSetupRawIO(virDomainObj *vm, virCommand *cmd G_GNUC_UNUSED) { bool rawio =3D false; @@ -5062,8 +5061,7 @@ qemuProcessSetupRawIO(virQEMUDriver *driver G_GNUC_UN= USED, =20 if (rawio) { #ifdef CAP_SYS_RAWIO - if (ret =3D=3D 0) - virCommandAllowCap(cmd, CAP_SYS_RAWIO); + virCommandAllowCap(cmd, CAP_SYS_RAWIO); #else virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Raw I/O is not supported on this platform")); @@ -7423,7 +7421,7 @@ qemuProcessLaunch(virConnectPtr conn, goto cleanup; =20 VIR_DEBUG("Setting up raw IO"); - if (qemuProcessSetupRawIO(driver, vm, cmd) < 0) + if (qemuProcessSetupRawIO(vm, cmd) < 0) goto cleanup; =20 virCommandSetPreExecHook(cmd, qemuProcessHook, &hookData); --=20 2.31.1