From nobody Mon Feb 9 12:07:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1578347935; cv=none; d=zohomail.com; s=zohoarc; b=LdmDbvgDaE818z8hMP3AQW7H9sz5lKhXn4U6rhL80BdEfdM5Igkp25XVr7um0iUvMWcti9IXVVK/gPz+jr/D0c+h5Q7Et8kSRKZvbTIyxXBl0VkNrbzSOqH+n1VcX8sk976qvbs5aITSY1HyK2dQ6AN/r4xyurZ16bNjiMFfYyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578347935; 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=GZp4YzSPE+KzSfo1STPqMA+1F2XKSTQ8uBdgQ28VtfY=; b=jHb3Jc3gHlmPHPw20jGN1L8GtdICPvMQRa+BVOi0iX87rP7S8ayOu6hftjuLSknGzBDpCue+ZDmXwgkcYM2MAJbcK1Jw3JY26x57ebIW3USTrdovJuhbmys2hjUQ5lapSdvaDuymVFCjMba974XTD6S9uAYKQ8zw5oBNeOenl6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1578347935973550.8238691225782; Mon, 6 Jan 2020 13:58:55 -0800 (PST) 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-206-xQXzatb_M0qUU_FyM0nxlw-1; Mon, 06 Jan 2020 16:58:52 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11B74107ACC5; Mon, 6 Jan 2020 21:58:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E4A7185F0D; Mon, 6 Jan 2020 21:58:45 +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 A4EE41803C42; Mon, 6 Jan 2020 21:58:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006LwJC7007273 for ; Mon, 6 Jan 2020 16:58:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 914EE2022AC6; Mon, 6 Jan 2020 21:58:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C2DC2022AA8 for ; Mon, 6 Jan 2020 21:58:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D5C218AE94C for ; Mon, 6 Jan 2020 21:58:19 +0000 (UTC) Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-WqOmdJt8M3C6qCEkKQ8nlA-1; Mon, 06 Jan 2020 16:58:17 -0500 Received: by mail-qv1-f68.google.com with SMTP id x1so19697839qvr.8 for ; Mon, 06 Jan 2020 13:58:17 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:655b:9e1c:e865:3705:e1df]) by smtp.gmail.com with ESMTPSA id x34sm23898440qtd.20.2020.01.06.13.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 13:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578347934; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GZp4YzSPE+KzSfo1STPqMA+1F2XKSTQ8uBdgQ28VtfY=; b=IhbnRZ2kQujHs2wqA14Az0lzRxNyk7KG07dGDSOak8pfFvgMRczosV3oe9Wi6FrJdbiKVY D2DsQd/Rxw1dzRcbxr3D9MgElcZBTlc2qOwT4g2Z/wK5RH3xXCsny1SCo007RgLEY/6gKU kLbHSdXRPpxIfmEnxUY98Ajto9SjWdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FLx6zgF1BVwcMBZqIp8IK8Kb1a7tUew2j2+f8abPmic=; b=bqgH227FrqqptrsxQBhY+Skk1zrKTjSAXc/nNbHbDMsdFWix4RWfUd61Q3BD8N6Emd bxKfgAd7jZ8i8Ytv0nczQDTTOEnnmbqKmz5Fydfc5YKTDv+T1/BYAseJz9eIeLpfj9Cg 5obRdnTNKsSrTqtq8QOEWbviFVSp+S0AcaRrOql15uMFTWW5mBCDXgpolHTvvVPKXgkz CAl7qXgmpIAwzqgJnjipL2onPPHFAYvPM6fLxA/IRUVxRNtRNHII4LkzIa7JPze0q2xx FG8UqFPghBkAtUJW1m1X9PN2fVqJSr0SSySfbA9QxJulKSsE7uIsHzqdVf8q0xX1ZXbp PUfw== X-Gm-Message-State: APjAAAWcneJxKWkw3LCc1KY8vdEIK0EwlSOgA3BF3gDqyZZ9q7uOVeqb n4/Ql9c5SzXaZJbtKipVKV47JRPy X-Google-Smtp-Source: APXvYqxWC10ClySws59NCcGBB47SDXtGt9TlXzA6D38oBa5AzaMScc/b4oacm04QtIxaSwG7aMPrYw== X-Received: by 2002:ad4:50d2:: with SMTP id e18mr81790982qvq.9.1578347897003; Mon, 06 Jan 2020 13:58:17 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 18:57:37 -0300 Message-Id: <20200106215750.361615-14-danielhb413@gmail.com> In-Reply-To: <20200106215750.361615-1-danielhb413@gmail.com> References: <20200106215750.361615-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: WqOmdJt8M3C6qCEkKQ8nlA-1 X-MC-Unique: xQXzatb_M0qUU_FyM0nxlw-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 006LwJC7007273 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 13/26] node_device: remove unneeded labels 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.13 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" gather_scsi_host_cap() in node_device_hal.c can be greatly simplified, given that the 'out' label is always getting hit regardless of 'retval', which can also be eliminated. Signed-off-by: Daniel Henrique Barboza --- src/node_device/node_device_driver.c | 4 ++-- src/node_device/node_device_hal.c | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index ebcc9696af..b630be4399 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -572,13 +572,13 @@ nodeConnectNodeDeviceEventRegisterAny(virConnectPtr c= onn, int callbackID =3D -1; =20 if (virConnectNodeDeviceEventRegisterAnyEnsureACL(conn) < 0) - goto cleanup; + return -1; =20 if (virNodeDeviceEventStateRegisterID(conn, driver->nodeDeviceEventSta= te, device, eventID, callback, opaque, freecb, &callbackID) < 0) callbackID =3D -1; - cleanup: + return callbackID; } =20 diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_devic= e_hal.c index cf12854fe9..4cef7c2c12 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -232,17 +232,9 @@ static int gather_scsi_host_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { - int retval =3D 0; - (void)get_int_prop(ctx, udi, "scsi_host.host", (int *)&d->scsi_host.ho= st); =20 - retval =3D virNodeDeviceGetSCSIHostCaps(&d->scsi_host); - - if (retval =3D=3D -1) - goto out; - - out: - return retval; + return virNodeDeviceGetSCSIHostCaps(&d->scsi_host); } =20 =20 --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list