From nobody Sat Feb 7 08:07:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495199366801197.78203047527404; Fri, 19 May 2017 06:09:26 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id BD0DA635C5; Fri, 19 May 2017 13:09:23 +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 8CF8280E94; Fri, 19 May 2017 13:09:23 +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 442CF4A494; Fri, 19 May 2017 13:09:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4JD93Qi005370 for ; Fri, 19 May 2017 09:09:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id B8CC180E78; Fri, 19 May 2017 13:09:03 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-18.phx2.redhat.com [10.3.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DB5380E74 for ; Fri, 19 May 2017 13:09:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BD0DA635C5 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BD0DA635C5 From: John Ferlan To: libvir-list@redhat.com Date: Fri, 19 May 2017 09:08:52 -0400 Message-Id: <20170519130853.13965-13-jferlan@redhat.com> In-Reply-To: <20170519130853.13965-1-jferlan@redhat.com> References: <20170519130853.13965-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 12/13] nodedev: Remove privateData from virNodeDeviceObj 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 19 May 2017 13:09:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It was only ever used in node_device_hal.c which really never used it anyway since the NODE_DEV_UDI was never referenced. Remove free_udi() and @privData as well as the references to obj->privateData & obj->privateF= ree. Signed-off-by: John Ferlan --- src/conf/node_device_conf.h | 2 -- src/conf/virnodedeviceobj.c | 2 -- src/node_device/node_device_hal.c | 15 --------------- 3 files changed, 19 deletions(-) diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index 5743f9d..0ab2b96 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -318,8 +318,6 @@ struct _virNodeDeviceObj { virMutex lock; =20 virNodeDeviceDefPtr def; /* device definition */ - void *privateData; /* driver-specific private data */ - void (*privateFree)(void *data); /* destructor for private data */ =20 }; =20 diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index dcf871c..86a552c 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -226,8 +226,6 @@ virNodeDeviceObjFree(virNodeDeviceObjPtr obj) return; =20 virNodeDeviceDefFree(obj->def); - if (obj->privateFree) - (*obj->privateFree)(obj->privateData); =20 virMutexDestroy(&obj->lock); =20 diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_devic= e_hal.c index 17cd130..e519b12 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -52,8 +52,6 @@ VIR_LOG_INIT("node_device.node_device_hal"); =20 #define DRV_STATE_HAL_CTX(ds) ((LibHalContext *)((ds)->privateData)) =20 -#define NODE_DEV_UDI(obj) ((const char *)((obj)->privateData) - =20 static const char * hal_name(const char *udi) @@ -447,12 +445,6 @@ gather_capabilities(LibHalContext *ctx, const char *ud= i, } =20 static void -free_udi(void *udi) -{ - VIR_FREE(udi); -} - -static void dev_create(const char *udi) { LibHalContext *ctx; @@ -462,12 +454,8 @@ dev_create(const char *udi) virNodeDeviceDefPtr objdef; const char *name =3D hal_name(udi); int rv; - char *privData; char *devicePath =3D NULL; =20 - if (VIR_STRDUP(privData, udi) < 0) - return; - nodeDeviceLock(); ctx =3D DRV_STATE_HAL_CTX(driver); =20 @@ -500,8 +488,6 @@ dev_create(const char *udi) } objdef =3D virNodeDeviceObjGetDef(obj); =20 - obj->privateData =3D privData; - obj->privateFree =3D free_udi; objdef->sysfs_path =3D devicePath; =20 virNodeDeviceObjUnlock(obj); @@ -512,7 +498,6 @@ dev_create(const char *udi) failure: VIR_DEBUG("FAILED TO ADD dev %s", name); cleanup: - VIR_FREE(privData); virNodeDeviceDefFree(def); nodeDeviceUnlock(); } --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list