From nobody Fri Dec 19 19:16:02 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 ARC-Seal: i=1; a=rsa-sha256; t=1559938967; cv=none; d=zoho.com; s=zohoarc; b=glS6shIufIQUxpLkVy+y51y/W2bDPnu7NoBB2gtt5ZDixWeZD5dgQ/cMqQQjEbv7z8BIIbgZcm1aD83N6i5MaM9/SguhwzNn6Ixq6RS8e4nIrtnQsH6K38pr6p1KgiUbk5QtzkyLe6BAoWs59CGQj3+J0+nMfgXdHft7a8JCzmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938967; 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:ARC-Authentication-Results; bh=vDX6h71o9A9pzhvOcryEv8XztdMOJDLS16MHWX0StF4=; b=JfN3uYjaL8C473AZvTNFSCgtIemEnRXQYdN64J/932bTXWkv+OfZxk9TrGEunorbN2lYM1xJryAximiyF/lVZ5Cjyy9XwJIZInBCp0IApXQdVsIG9XQp1URoch4+d8aj2dv7TVgxOjXqJs9zzDvTUsAIiYuBIhk8l10EWFzaKx4= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155993896796316.94857234268477; Fri, 7 Jun 2019 13:22:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E86130C31B5; Fri, 7 Jun 2019 20:22:42 +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 EEFF85D9CC; Fri, 7 Jun 2019 20:22:40 +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 A0739206D7; Fri, 7 Jun 2019 20:22:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57KKfAT025733 for ; Fri, 7 Jun 2019 16:20:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 598AB5C220; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-185.phx2.redhat.com [10.3.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 289CD5C205 for ; Fri, 7 Jun 2019 20:20:41 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 15:20:22 -0500 Message-Id: <20190607202030.29625-12-jjongsma@redhat.com> In-Reply-To: <20190607202030.29625-1-jjongsma@redhat.com> References: <20190607202030.29625-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/19] src/cpu: use #pragma once in headers 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Jun 2019 20:22:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma --- src/cpu/cpu.h | 19 ++++++------- src/cpu/cpu_arm.h | 7 ++--- src/cpu/cpu_map.h | 7 ++--- src/cpu/cpu_ppc64.h | 7 ++--- src/cpu/cpu_ppc64_data.h | 8 ++---- src/cpu/cpu_s390.h | 7 ++--- src/cpu/cpu_x86.h | 9 +++---- src/cpu/cpu_x86_data.h | 58 +++++++++++++++++++--------------------- 8 files changed, 48 insertions(+), 74 deletions(-) diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 3446627e18..7cc9e7d9db 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -18,16 +18,15 @@ * . */ =20 -#ifndef LIBVIRT_CPU_H -# define LIBVIRT_CPU_H +#pragma once =20 -# include "virerror.h" -# include "datatypes.h" -# include "virarch.h" -# include "domain_capabilities.h" -# include "cpu_conf.h" -# include "cpu_x86_data.h" -# include "cpu_ppc64_data.h" +#include "virerror.h" +#include "datatypes.h" +#include "virarch.h" +#include "domain_capabilities.h" +#include "cpu_conf.h" +#include "cpu_x86_data.h" +#include "cpu_ppc64_data.h" =20 =20 typedef struct _virCPUData virCPUData; @@ -264,5 +263,3 @@ char *virCPUDataFormat(const virCPUData *data) ATTRIBUTE_NONNULL(1); virCPUDataPtr virCPUDataParse(const char *xmlStr) ATTRIBUTE_NONNULL(1); - -#endif /* LIBVIRT_CPU_H */ diff --git a/src/cpu/cpu_arm.h b/src/cpu/cpu_arm.h index c1a8939a61..a182a832c7 100644 --- a/src/cpu/cpu_arm.h +++ b/src/cpu/cpu_arm.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_ARM_H -# define LIBVIRT_CPU_ARM_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverArm; - -#endif /* LIBVIRT_CPU_ARM_H */ diff --git a/src/cpu/cpu_map.h b/src/cpu/cpu_map.h index a7a7509b7e..2d95cdb8e8 100644 --- a/src/cpu/cpu_map.h +++ b/src/cpu/cpu_map.h @@ -18,10 +18,9 @@ * . */ =20 -#ifndef LIBVIRT_CPU_MAP_H -# define LIBVIRT_CPU_MAP_H +#pragma once =20 -# include "virxml.h" +#include "virxml.h" =20 typedef int (*cpuMapLoadCallback) (xmlXPathContextPtr ctxt, @@ -34,5 +33,3 @@ cpuMapLoad(const char *arch, cpuMapLoadCallback featureCB, cpuMapLoadCallback modelCB, void *data); - -#endif /* LIBVIRT_CPU_MAP_H */ diff --git a/src/cpu/cpu_ppc64.h b/src/cpu/cpu_ppc64.h index 18b8376bb7..fade97ba93 100644 --- a/src/cpu/cpu_ppc64.h +++ b/src/cpu/cpu_ppc64.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_PPC64_H -# define LIBVIRT_CPU_PPC64_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverPPC64; - -#endif /* LIBVIRT_CPU_PPC64_H */ diff --git a/src/cpu/cpu_ppc64_data.h b/src/cpu/cpu_ppc64_data.h index 2018cbbb6f..59aa13562f 100644 --- a/src/cpu/cpu_ppc64_data.h +++ b/src/cpu/cpu_ppc64_data.h @@ -18,9 +18,7 @@ * . */ =20 -#ifndef LIBVIRT_CPU_PPC64_DATA_H -# define LIBVIRT_CPU_PPC64_DATA_H - +#pragma once =20 typedef struct _virCPUppc64PVR virCPUppc64PVR; struct _virCPUppc64PVR { @@ -28,12 +26,10 @@ struct _virCPUppc64PVR { uint32_t mask; }; =20 -# define VIR_CPU_PPC64_DATA_INIT { 0 } +#define VIR_CPU_PPC64_DATA_INIT { 0 } =20 typedef struct _virCPUppc64Data virCPUppc64Data; struct _virCPUppc64Data { size_t len; virCPUppc64PVR *pvr; }; - -#endif /* LIBVIRT_CPU_PPC64_DATA_H */ diff --git a/src/cpu/cpu_s390.h b/src/cpu/cpu_s390.h index 4c45e1b32c..2a3bafa5b8 100644 --- a/src/cpu/cpu_s390.h +++ b/src/cpu/cpu_s390.h @@ -18,11 +18,8 @@ * . */ =20 -#ifndef LIBVIRT_CPU_S390_H -# define LIBVIRT_CPU_S390_H +#pragma once =20 -# include "cpu.h" +#include "cpu.h" =20 extern struct cpuArchDriver cpuDriverS390; - -#endif /* LIBVIRT_CPU_S390_H */ diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h index cd44cbe4f3..29037d4afa 100644 --- a/src/cpu/cpu_x86.h +++ b/src/cpu/cpu_x86.h @@ -18,11 +18,10 @@ * . */ =20 -#ifndef LIBVIRT_CPU_X86_H -# define LIBVIRT_CPU_X86_H +#pragma once =20 -# include "cpu.h" -# include "cpu_x86_data.h" +#include "cpu.h" +#include "cpu_x86_data.h" =20 extern struct cpuArchDriver cpuDriverX86; =20 @@ -44,5 +43,3 @@ int virCPUx86DataSetVendor(virCPUDataPtr cpuData, =20 int virCPUx86DataAddFeature(virCPUDataPtr cpuData, const char *name); - -#endif /* LIBVIRT_CPU_X86_H */ diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index 4600870c4c..f3f4d7ab9c 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -18,9 +18,7 @@ * . */ =20 -#ifndef LIBVIRT_CPU_X86_DATA_H -# define LIBVIRT_CPU_X86_DATA_H - +#pragma once =20 typedef struct _virCPUx86CPUID virCPUx86CPUID; typedef virCPUx86CPUID *virCPUx86CPUIDPtr; @@ -41,41 +39,41 @@ struct _virCPUx86MSR { uint32_t edx; }; =20 -# define CPUX86_BASIC 0x0 -# define CPUX86_KVM 0x40000000 -# define CPUX86_EXTENDED 0x80000000 +#define CPUX86_BASIC 0x0 +#define CPUX86_KVM 0x40000000 +#define CPUX86_EXTENDED 0x80000000 =20 -# define VIR_CPU_x86_KVM_CLOCKSOURCE "__kvm_clocksource" -# define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay" -# define VIR_CPU_x86_KVM_MMU_OP "__kvm_mmu_op" -# define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2" -# define VIR_CPU_x86_KVM_ASYNC_PF "__kvm_async_pf" -# define VIR_CPU_x86_KVM_STEAL_TIME "__kvm_steal_time" -# define VIR_CPU_x86_KVM_PV_EOI "__kvm_pv_eoi" -# define VIR_CPU_x86_KVM_PV_UNHALT "__kvm_pv_unhalt" -# define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable" +#define VIR_CPU_x86_KVM_CLOCKSOURCE "__kvm_clocksource" +#define VIR_CPU_x86_KVM_NOP_IO_DELAY "__kvm_no_io_delay" +#define VIR_CPU_x86_KVM_MMU_OP "__kvm_mmu_op" +#define VIR_CPU_x86_KVM_CLOCKSOURCE2 "__kvm_clocksource2" +#define VIR_CPU_x86_KVM_ASYNC_PF "__kvm_async_pf" +#define VIR_CPU_x86_KVM_STEAL_TIME "__kvm_steal_time" +#define VIR_CPU_x86_KVM_PV_EOI "__kvm_pv_eoi" +#define VIR_CPU_x86_KVM_PV_UNHALT "__kvm_pv_unhalt" +#define VIR_CPU_x86_KVM_CLOCKSOURCE_STABLE_BIT "__kvm_clocksource_stable" =20 /* * The following HyperV feature names suffixes must exactly match correspo= nding * ones defined for virDomainHyperv in domain_conf.c. * E.g "__kvm_runtime" -> "runtime", "__kvm_hv_spinlocks" -> "spinlocks" e= tc. */ -# define VIR_CPU_x86_KVM_HV_RUNTIME "__kvm_hv_runtime" -# define VIR_CPU_x86_KVM_HV_SYNIC "__kvm_hv_synic" -# define VIR_CPU_x86_KVM_HV_STIMER "__kvm_hv_stimer" -# define VIR_CPU_x86_KVM_HV_RELAXED "__kvm_hv_relaxed" -# define VIR_CPU_x86_KVM_HV_SPINLOCKS "__kvm_hv_spinlocks" -# define VIR_CPU_x86_KVM_HV_VAPIC "__kvm_hv_vapic" -# define VIR_CPU_x86_KVM_HV_VPINDEX "__kvm_hv_vpindex" -# define VIR_CPU_x86_KVM_HV_RESET "__kvm_hv_reset" -# define VIR_CPU_x86_KVM_HV_FREQUENCIES "__kvm_hv_frequencies" -# define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "__kvm_hv_reenlightenment" -# define VIR_CPU_x86_KVM_HV_TLBFLUSH "__kvm_hv_tlbflush" -# define VIR_CPU_x86_KVM_HV_IPI "__kvm_hv_ipi" -# define VIR_CPU_x86_KVM_HV_EVMCS "__kvm_hv_evmcs" +#define VIR_CPU_x86_KVM_HV_RUNTIME "__kvm_hv_runtime" +#define VIR_CPU_x86_KVM_HV_SYNIC "__kvm_hv_synic" +#define VIR_CPU_x86_KVM_HV_STIMER "__kvm_hv_stimer" +#define VIR_CPU_x86_KVM_HV_RELAXED "__kvm_hv_relaxed" +#define VIR_CPU_x86_KVM_HV_SPINLOCKS "__kvm_hv_spinlocks" +#define VIR_CPU_x86_KVM_HV_VAPIC "__kvm_hv_vapic" +#define VIR_CPU_x86_KVM_HV_VPINDEX "__kvm_hv_vpindex" +#define VIR_CPU_x86_KVM_HV_RESET "__kvm_hv_reset" +#define VIR_CPU_x86_KVM_HV_FREQUENCIES "__kvm_hv_frequencies" +#define VIR_CPU_x86_KVM_HV_REENLIGHTENMENT "__kvm_hv_reenlightenment" +#define VIR_CPU_x86_KVM_HV_TLBFLUSH "__kvm_hv_tlbflush" +#define VIR_CPU_x86_KVM_HV_IPI "__kvm_hv_ipi" +#define VIR_CPU_x86_KVM_HV_EVMCS "__kvm_hv_evmcs" =20 =20 -# define VIR_CPU_X86_DATA_INIT { 0 } +#define VIR_CPU_X86_DATA_INIT { 0 } =20 typedef enum { VIR_CPU_X86_DATA_NONE =3D 0, @@ -98,5 +96,3 @@ struct _virCPUx86Data { size_t len; virCPUx86DataItem *items; }; - -#endif /* LIBVIRT_CPU_X86_DATA_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list