From nobody Mon Dec 15 01:53:48 2025 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.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524487536533588.9947390681386; Mon, 23 Apr 2018 05:45:36 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 0624887620; Mon, 23 Apr 2018 12:45:35 +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 B50A16767D; Mon, 23 Apr 2018 12:45:34 +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 4F0FF4CAB0; Mon, 23 Apr 2018 12:45:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3NCjBit011891 for ; Mon, 23 Apr 2018 08:45:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 381C710FFE72; Mon, 23 Apr 2018 12:45:11 +0000 (UTC) Received: from caroline.localdomain (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECEC21102E2A for ; Mon, 23 Apr 2018 12:45:10 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline.localdomain (Postfix) with ESMTP id E6A8D120075 for ; Mon, 23 Apr 2018 14:45:07 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 14:44:39 +0200 Message-Id: <7e824ddc97cbad44f075f60ba1a4eb9d37c63b17.1524487472.git.mkletzan@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/29] node_device: Add spaces after casts 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 23 Apr 2018 12:45:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- src/node_device/node_device_hal.c | 106 +++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_devic= e_hal.c index 2101101bc691..7440feafe090 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -49,7 +49,7 @@ VIR_LOG_INIT("node_device.node_device_hal"); * Host device enumeration (HAL implementation) */ =20 -#define DRV_STATE_HAL_CTX(ds) ((LibHalContext *)((ds)->privateData)) +#define DRV_STATE_HAL_CTX(ds) ((LibHalContext *) ((ds)->privateData)) =20 =20 static const char * @@ -157,12 +157,12 @@ gather_pci_cap(LibHalContext *ctx, const char *udi, VIR_FREE(sysfs_path); } =20 - (void)get_int_prop(ctx, udi, "pci.vendor_id", (int *)&d->pci_dev.vendo= r); + (void) get_int_prop(ctx, udi, "pci.vendor_id", (int *) &d->pci_dev.ven= dor); if (get_str_prop(ctx, udi, "pci.vendor", &d->pci_dev.vendor_name) !=3D= 0) - (void)get_str_prop(ctx, udi, "info.vendor", &d->pci_dev.vendor_nam= e); - (void)get_int_prop(ctx, udi, "pci.product_id", (int *)&d->pci_dev.prod= uct); + (void) get_str_prop(ctx, udi, "info.vendor", &d->pci_dev.vendor_na= me); + (void) get_int_prop(ctx, udi, "pci.product_id", (int *) &d->pci_dev.pr= oduct); if (get_str_prop(ctx, udi, "pci.product", &d->pci_dev.product_name) != =3D 0) - (void)get_str_prop(ctx, udi, "info.product", &d->pci_dev.product_n= ame); + (void) get_str_prop(ctx, udi, "info.product", &d->pci_dev.product_= name); =20 return 0; } @@ -172,15 +172,15 @@ static int gather_usb_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { - (void)get_int_prop(ctx, udi, "usb.interface.number", - (int *)&d->usb_if.number); - (void)get_int_prop(ctx, udi, "usb.interface.class", - (int *)&d->usb_if._class); - (void)get_int_prop(ctx, udi, "usb.interface.subclass", - (int *)&d->usb_if.subclass); - (void)get_int_prop(ctx, udi, "usb.interface.protocol", - (int *)&d->usb_if.protocol); - (void)get_str_prop(ctx, udi, "usb.interface.description", + (void) get_int_prop(ctx, udi, "usb.interface.number", + (int *) &d->usb_if.number); + (void) get_int_prop(ctx, udi, "usb.interface.class", + (int *) &d->usb_if._class); + (void) get_int_prop(ctx, udi, "usb.interface.subclass", + (int *) &d->usb_if.subclass); + (void) get_int_prop(ctx, udi, "usb.interface.protocol", + (int *) &d->usb_if.protocol); + (void) get_str_prop(ctx, udi, "usb.interface.description", &d->usb_if.description); return 0; } @@ -190,20 +190,20 @@ static int gather_usb_device_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { - (void)get_int_prop(ctx, udi, "usb_device.bus_number", - (int *)&d->usb_dev.bus); - (void)get_int_prop(ctx, udi, "usb_device.linux.device_number", - (int *)&d->usb_dev.device); - (void)get_int_prop(ctx, udi, "usb_device.vendor_id", - (int *)&d->usb_dev.vendor); + (void) get_int_prop(ctx, udi, "usb_device.bus_number", + (int *) &d->usb_dev.bus); + (void) get_int_prop(ctx, udi, "usb_device.linux.device_number", + (int *) &d->usb_dev.device); + (void) get_int_prop(ctx, udi, "usb_device.vendor_id", + (int *) &d->usb_dev.vendor); if (get_str_prop(ctx, udi, "usb_device.vendor", &d->usb_dev.vendor_name) !=3D 0) - (void)get_str_prop(ctx, udi, "info.vendor", &d->usb_dev.vendor_nam= e); - (void)get_int_prop(ctx, udi, "usb_device.product_id", - (int *)&d->usb_dev.product); + (void) get_str_prop(ctx, udi, "info.vendor", &d->usb_dev.vendor_na= me); + (void) get_int_prop(ctx, udi, "usb_device.product_id", + (int *) &d->usb_dev.product); if (get_str_prop(ctx, udi, "usb_device.product", &d->usb_dev.product_name) !=3D 0) - (void)get_str_prop(ctx, udi, "info.product", &d->usb_dev.product_n= ame); + (void) get_str_prop(ctx, udi, "info.product", &d->usb_dev.product_= name); return 0; } =20 @@ -213,8 +213,8 @@ gather_net_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { unsigned long long dummy; - (void)get_str_prop(ctx, udi, "net.interface", &d->net.ifname); - (void)get_str_prop(ctx, udi, "net.address", &d->net.address); + (void) get_str_prop(ctx, udi, "net.interface", &d->net.ifname); + (void) get_str_prop(ctx, udi, "net.address", &d->net.address); if (get_uint64_prop(ctx, udi, "net.80203.mac_address", &dummy) =3D=3D 0) d->net.subtype =3D VIR_NODE_DEV_CAP_NET_80203; @@ -234,7 +234,7 @@ gather_scsi_host_cap(LibHalContext *ctx, const char *ud= i, { int retval =3D 0; =20 - (void)get_int_prop(ctx, udi, "scsi_host.host", (int *)&d->scsi_host.ho= st); + (void) get_int_prop(ctx, udi, "scsi_host.host", (int *) &d->scsi_host.= host); =20 retval =3D virNodeDeviceGetSCSIHostCaps(&d->scsi_host); =20 @@ -250,11 +250,11 @@ static int gather_scsi_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { - (void)get_int_prop(ctx, udi, "scsi.host", (int *)&d->scsi.host); - (void)get_int_prop(ctx, udi, "scsi.bus", (int *)&d->scsi.bus); - (void)get_int_prop(ctx, udi, "scsi.target", (int *)&d->scsi.target); - (void)get_int_prop(ctx, udi, "scsi.lun", (int *)&d->scsi.lun); - (void)get_str_prop(ctx, udi, "scsi.type", &d->scsi.type); + (void) get_int_prop(ctx, udi, "scsi.host", (int *) &d->scsi.host); + (void) get_int_prop(ctx, udi, "scsi.bus", (int *) &d->scsi.bus); + (void) get_int_prop(ctx, udi, "scsi.target", (int *) &d->scsi.target); + (void) get_int_prop(ctx, udi, "scsi.lun", (int *) &d->scsi.lun); + (void) get_str_prop(ctx, udi, "scsi.type", &d->scsi.type); return 0; } =20 @@ -264,23 +264,23 @@ gather_storage_cap(LibHalContext *ctx, const char *ud= i, virNodeDevCapDataPtr d) { int val; - (void)get_str_prop(ctx, udi, "block.device", &d->storage.block); - (void)get_str_prop(ctx, udi, "storage.bus", &d->storage.bus); - (void)get_str_prop(ctx, udi, "storage.drive_type", &d->storage.drive_t= ype); - (void)get_str_prop(ctx, udi, "storage.model", &d->storage.model); - (void)get_str_prop(ctx, udi, "storage.vendor", &d->storage.vendor); - (void)get_str_prop(ctx, udi, "storage.serial", &d->storage.serial); + (void) get_str_prop(ctx, udi, "block.device", &d->storage.block); + (void) get_str_prop(ctx, udi, "storage.bus", &d->storage.bus); + (void) get_str_prop(ctx, udi, "storage.drive_type", &d->storage.drive_= type); + (void) get_str_prop(ctx, udi, "storage.model", &d->storage.model); + (void) get_str_prop(ctx, udi, "storage.vendor", &d->storage.vendor); + (void) get_str_prop(ctx, udi, "storage.serial", &d->storage.serial); if (get_bool_prop(ctx, udi, "storage.removable", &val) =3D=3D 0 && val= ) { d->storage.flags |=3D VIR_NODE_DEV_CAP_STORAGE_REMOVABLE; if (get_bool_prop(ctx, udi, "storage.removable.media_available", &val) =3D=3D 0 && val) { d->storage.flags |=3D VIR_NODE_DEV_CAP_STORAGE_REMOVABLE_MEDIA_AVAILABLE; - (void)get_uint64_prop(ctx, udi, "storage.removable.media_size", + (void) get_uint64_prop(ctx, udi, "storage.removable.media_size= ", &d->storage.removable_media_size); } } else { - (void)get_uint64_prop(ctx, udi, "storage.size", &d->storage.size); + (void) get_uint64_prop(ctx, udi, "storage.size", &d->storage.size); } if (get_bool_prop(ctx, udi, "storage.hotpluggable", &val) =3D=3D 0 && = val) d->storage.flags |=3D VIR_NODE_DEV_CAP_STORAGE_HOTPLUGGABLE; @@ -291,7 +291,7 @@ static int gather_scsi_generic_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) { - (void)get_str_prop(ctx, udi, "scsi_generic.device", &d->sg.path); + (void) get_str_prop(ctx, udi, "scsi_generic.device", &d->sg.path); return 0; } =20 @@ -302,22 +302,22 @@ gather_system_cap(LibHalContext *ctx, const char *udi, { char *uuidstr; =20 - (void)get_str_prop(ctx, udi, "system.product", &d->system.product_name= ); - (void)get_str_prop(ctx, udi, "system.hardware.vendor", + (void) get_str_prop(ctx, udi, "system.product", &d->system.product_nam= e); + (void) get_str_prop(ctx, udi, "system.hardware.vendor", &d->system.hardware.vendor_name); - (void)get_str_prop(ctx, udi, "system.hardware.version", + (void) get_str_prop(ctx, udi, "system.hardware.version", &d->system.hardware.version); - (void)get_str_prop(ctx, udi, "system.hardware.serial", + (void) get_str_prop(ctx, udi, "system.hardware.serial", &d->system.hardware.serial); if (get_str_prop(ctx, udi, "system.hardware.uuid", &uuidstr) =3D=3D 0)= { ignore_value(virUUIDParse(uuidstr, d->system.hardware.uuid)); VIR_FREE(uuidstr); } - (void)get_str_prop(ctx, udi, "system.firmware.vendor", + (void) get_str_prop(ctx, udi, "system.firmware.vendor", &d->system.firmware.vendor_name); - (void)get_str_prop(ctx, udi, "system.firmware.version", + (void) get_str_prop(ctx, udi, "system.firmware.version", &d->system.firmware.version); - (void)get_str_prop(ctx, udi, "system.firmware.release_date", + (void) get_str_prop(ctx, udi, "system.firmware.release_date", &d->system.firmware.release_date); return 0; } @@ -479,7 +479,7 @@ dev_create(const char *udi) goto cleanup; =20 /* Some devices don't have a path in sysfs, so ignore failure */ - (void)get_str_prop(ctx, udi, "linux.sysfs_path", &devicePath); + (void) get_str_prop(ctx, udi, "linux.sysfs_path", &devicePath); =20 if (!(obj =3D virNodeDeviceObjListAssignDef(driver->devs, def))) { VIR_FREE(devicePath); @@ -556,7 +556,7 @@ device_cap_added(LibHalContext *ctx, VIR_DEBUG("%s %s", cap, name); if ((obj =3D virNodeDeviceObjListFindByName(driver->devs, name))) { def =3D virNodeDeviceObjGetDef(obj); - (void)gather_capability(ctx, udi, cap, &def->caps); + (void) gather_capability(ctx, udi, cap, &def->caps); virNodeDeviceObjEndAPI(&obj); } else { VIR_DEBUG("no device named %s", name); @@ -695,7 +695,7 @@ nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED, } virNodeDeviceObjListFree(driver->devs); if (hal_ctx) - (void)libhal_ctx_free(hal_ctx); + (void) libhal_ctx_free(hal_ctx); nodeDeviceUnlock(); VIR_FREE(driver); =20 @@ -710,8 +710,8 @@ nodeStateCleanup(void) nodeDeviceLock(); LibHalContext *hal_ctx =3D DRV_STATE_HAL_CTX(driver); virNodeDeviceObjListFree(driver->devs); - (void)libhal_ctx_shutdown(hal_ctx, NULL); - (void)libhal_ctx_free(hal_ctx); + (void) libhal_ctx_shutdown(hal_ctx, NULL); + (void) libhal_ctx_free(hal_ctx); nodeDeviceUnlock(); virMutexDestroy(&driver->lock); VIR_FREE(driver); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list