From nobody Sun Feb 8 19:24:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1603295170; cv=none; d=zohomail.com; s=zohoarc; b=nzWZs/PkHUbbEx0jm4GQeJ7WCXaMj5t1uvIx30qs2QEVa/jahg+dLrZAWhHFiL+0Chzk2iy5Wlin+GXi1aT1CAfPzsx1weR7+NiEri3d8kP3ClMCB82uLeejjeGbKApkPDvqIvRKIZ3nu5y+sr4v2lIa6Zmn9oYgsBe5okk6m10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603295170; 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=ZjzFmTIW9Ghm3NP690w1+MLIwdsB+z/Y1hQr2zzcRYM=; b=YCLSZQYarGysaZRz6ZNqc0Nmac+YojSg2xmmq/Bkj22InikImzXl7GA0ztzOpdpA3JeTx4yglrYk6VoF0avpAW8PwWWOzu9GLTKsC0EhwzPUCgYp5setING3MnUDUtOgILwgEsds4zbU5BcpfUgFfsIHXJx0ntGvQuFV2k7PL4Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1603295170339402.4622000099646; Wed, 21 Oct 2020 08:46:10 -0700 (PDT) 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-522-79IR6a1rPS-crWhgH7jgRA-1; Wed, 21 Oct 2020 11:45:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10D14AD766; Wed, 21 Oct 2020 15:45:25 +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 E2EC975123; Wed, 21 Oct 2020 15:45:24 +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 ABC8A922E9; Wed, 21 Oct 2020 15:45:24 +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 09LFj196032115 for ; Wed, 21 Oct 2020 11:45:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 572335C26A; Wed, 21 Oct 2020 15:45:01 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3F475C269 for ; Wed, 21 Oct 2020 15:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603295169; 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=ZjzFmTIW9Ghm3NP690w1+MLIwdsB+z/Y1hQr2zzcRYM=; b=RYt7guhna4/QghoFVqoHXf/NnfZQ8FXj0KIQtEo36F+xh+8kGAaCn5cwe3h8upsgJU0d+j 8e2IHR0VMbi3aEro2ONqbBndWnEYQiYazksDGwiAk6Pdv7qsg5lqNlP6u4rPPwLzqGJC+G D/JTLu/JcaSZCkuQ38IGIisImeQu7GY= X-MC-Unique: 79IR6a1rPS-crWhgH7jgRA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/4] hyperv: Use two empty lines between functions Date: Wed, 21 Oct 2020 17:44:52 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.15 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In some places we separate functions with only one line, in others with three lines and the rest uses two lines. Signed-off-by: Michal Privoznik --- src/hyperv/hyperv_driver.c | 50 +++++++++----------------------------- src/hyperv/hyperv_util.c | 1 - src/hyperv/hyperv_wmi.c | 20 +++++++++++++-- 3 files changed, 30 insertions(+), 41 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index d08b6cff2e..b8cd213758 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -86,6 +86,7 @@ hypervGetProcessorsByName(hypervPrivate *priv, const char= *name, return 0; } =20 + static int hypervGetActiveVirtualSystemList(hypervPrivate *priv, Msvm_ComputerSystem **computerSystemList) @@ -106,6 +107,7 @@ hypervGetActiveVirtualSystemList(hypervPrivate *priv, return 0; } =20 + /* gets all the vms including the ones that are marked inactive. */ static int hypervGetInactiveVirtualSystemList(hypervPrivate *priv, @@ -127,6 +129,7 @@ hypervGetInactiveVirtualSystemList(hypervPrivate *priv, return 0; } =20 + static int hypervGetPhysicalSystemList(hypervPrivate *priv, Win32_ComputerSystem **computerSystemList) @@ -145,6 +148,7 @@ hypervGetPhysicalSystemList(hypervPrivate *priv, return 0; } =20 + static int hypervGetVirtualSystemByID(hypervPrivate *priv, int id, Msvm_ComputerSystem **computerSystemList) @@ -167,6 +171,7 @@ hypervGetVirtualSystemByID(hypervPrivate *priv, int id, return 0; } =20 + static int hypervGetVirtualSystemByUUID(hypervPrivate *priv, const char *uuid, Msvm_ComputerSystem **computerSystemList) @@ -214,6 +219,7 @@ hypervGetVirtualSystemByName(hypervPrivate *priv, const= char *name, return 0; } =20 + static int hypervGetVSSDFromUUID(hypervPrivate *priv, const char *uuid, Msvm_VirtualSystemSettingData **data) @@ -238,6 +244,7 @@ hypervGetVSSDFromUUID(hypervPrivate *priv, const char *= uuid, return 0; } =20 + static int hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, const char *id, Msvm_ProcessorSettingData **data) @@ -262,6 +269,7 @@ hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, co= nst char *id, return 0; } =20 + static int hypervGetMemSDByVSSDInstanceId(hypervPrivate *priv, const char *id, Msvm_MemorySettingData **data) @@ -333,6 +341,7 @@ hypervParseVersionString(const char *str, unsigned int = *major, return 0; } =20 + static int hypervLookupHostSystemBiosUuid(hypervPrivate *priv, unsigned char *uuid) { @@ -358,6 +367,7 @@ hypervLookupHostSystemBiosUuid(hypervPrivate *priv, uns= igned char *uuid) return result; } =20 + static virCapsPtr hypervCapsInit(hypervPrivate *priv) { @@ -397,8 +407,6 @@ hypervCapsInit(hypervPrivate *priv) return NULL; } =20 - - /* * Driver functions */ @@ -419,6 +427,7 @@ hypervFreePrivate(hypervPrivate **priv) VIR_FREE(*priv); } =20 + static int hypervInitConnection(virConnectPtr conn, hypervPrivate *priv, char *username, char *password) @@ -478,6 +487,7 @@ hypervInitConnection(virConnectPtr conn, hypervPrivate = *priv, return ret; } =20 + static virDrvOpenStatus hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, virConfPtr conf G_GNUC_UNUSED, @@ -543,7 +553,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr= auth, } =20 =20 - static int hypervConnectClose(virConnectPtr conn) { @@ -557,7 +566,6 @@ hypervConnectClose(virConnectPtr conn) } =20 =20 - static const char * hypervConnectGetType(virConnectPtr conn G_GNUC_UNUSED) { @@ -565,7 +573,6 @@ hypervConnectGetType(virConnectPtr conn G_GNUC_UNUSED) } =20 =20 - static int hypervConnectGetVersion(virConnectPtr conn, unsigned long *version) { @@ -628,7 +635,6 @@ hypervConnectGetVersion(virConnectPtr conn, unsigned lo= ng *version) } =20 =20 - static char * hypervConnectGetHostname(virConnectPtr conn) { @@ -648,7 +654,6 @@ hypervConnectGetHostname(virConnectPtr conn) } =20 =20 - static char* hypervConnectGetCapabilities(virConnectPtr conn) { @@ -658,7 +663,6 @@ hypervConnectGetCapabilities(virConnectPtr conn) } =20 =20 - static int hypervConnectGetMaxVcpus(virConnectPtr conn, const char *type G_GNUC_UNUSE= D) { @@ -691,7 +695,6 @@ hypervConnectGetMaxVcpus(virConnectPtr conn, const char= *type G_GNUC_UNUSED) } =20 =20 - static int hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) { @@ -766,7 +769,6 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr in= fo) } =20 =20 - static int hypervConnectListDomains(virConnectPtr conn, int *ids, int maxids) { @@ -799,7 +801,6 @@ hypervConnectListDomains(virConnectPtr conn, int *ids, = int maxids) } =20 =20 - static int hypervConnectNumOfDomains(virConnectPtr conn) { @@ -826,7 +827,6 @@ hypervConnectNumOfDomains(virConnectPtr conn) } =20 =20 - static virDomainPtr hypervDomainLookupByID(virConnectPtr conn, int id) { @@ -846,7 +846,6 @@ hypervDomainLookupByID(virConnectPtr conn, int id) } =20 =20 - static virDomainPtr hypervDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) { @@ -869,7 +868,6 @@ hypervDomainLookupByUUID(virConnectPtr conn, const unsi= gned char *uuid) } =20 =20 - static virDomainPtr hypervDomainLookupByName(virConnectPtr conn, const char *name) { @@ -889,7 +887,6 @@ hypervDomainLookupByName(virConnectPtr conn, const char= *name) } =20 =20 - static int hypervDomainSuspend(virDomainPtr domain) { @@ -909,7 +906,6 @@ hypervDomainSuspend(virDomainPtr domain) } =20 =20 - static int hypervDomainResume(virDomainPtr domain) { @@ -1019,7 +1015,6 @@ hypervDomainShutdown(virDomainPtr domain) } =20 =20 - static int hypervDomainReboot(virDomainPtr domain, unsigned int flags) { @@ -1028,7 +1023,6 @@ hypervDomainReboot(virDomainPtr domain, unsigned int = flags) } =20 =20 - static int hypervDomainReset(virDomainPtr domain, unsigned int flags) { @@ -1037,7 +1031,6 @@ hypervDomainReset(virDomainPtr domain, unsigned int f= lags) } =20 =20 - static int hypervDomainDestroyFlags(virDomainPtr domain, unsigned int flags) { @@ -1068,7 +1061,6 @@ hypervDomainDestroyFlags(virDomainPtr domain, unsigne= d int flags) } =20 =20 - static int hypervDomainDestroy(virDomainPtr domain) { @@ -1076,7 +1068,6 @@ hypervDomainDestroy(virDomainPtr domain) } =20 =20 - static char * hypervDomainGetOSType(virDomainPtr domain G_GNUC_UNUSED) { @@ -1087,7 +1078,6 @@ hypervDomainGetOSType(virDomainPtr domain G_GNUC_UNUS= ED) } =20 =20 - static int hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) { @@ -1143,7 +1133,6 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInf= oPtr info) } =20 =20 - static int hypervDomainGetState(virDomainPtr domain, int *state, int *reason, unsigned int flags) @@ -1171,7 +1160,6 @@ hypervDomainGetState(virDomainPtr domain, int *state,= int *reason, } =20 =20 - static char * hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) { @@ -1284,7 +1272,6 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned = int flags) } =20 =20 - static int hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, in= t maxnames) { @@ -1327,7 +1314,6 @@ hypervConnectListDefinedDomains(virConnectPtr conn, c= har **const names, int maxn } =20 =20 - static int hypervConnectNumOfDefinedDomains(virConnectPtr conn) { @@ -1354,7 +1340,6 @@ hypervConnectNumOfDefinedDomains(virConnectPtr conn) } =20 =20 - static int hypervDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) { @@ -1383,7 +1368,6 @@ hypervDomainCreateWithFlags(virDomainPtr domain, unsi= gned int flags) } =20 =20 - static int hypervDomainCreate(virDomainPtr domain) { @@ -1391,7 +1375,6 @@ hypervDomainCreate(virDomainPtr domain) } =20 =20 - static int hypervDomainGetAutostart(virDomainPtr domain, int *autostart) { @@ -1549,7 +1532,6 @@ hypervConnectIsEncrypted(virConnectPtr conn) } =20 =20 - static int hypervConnectIsSecure(virConnectPtr conn) { @@ -1563,7 +1545,6 @@ hypervConnectIsSecure(virConnectPtr conn) } =20 =20 - static int hypervConnectIsAlive(virConnectPtr conn) { @@ -1580,7 +1561,6 @@ hypervConnectIsAlive(virConnectPtr conn) } =20 =20 - static int hypervDomainIsActive(virDomainPtr domain) { @@ -1600,7 +1580,6 @@ hypervDomainIsActive(virDomainPtr domain) } =20 =20 - static int hypervDomainIsPersistent(virDomainPtr domain G_GNUC_UNUSED) { @@ -1609,7 +1588,6 @@ hypervDomainIsPersistent(virDomainPtr domain G_GNUC_U= NUSED) } =20 =20 - static int hypervDomainIsUpdated(virDomainPtr domain G_GNUC_UNUSED) { @@ -1617,7 +1595,6 @@ hypervDomainIsUpdated(virDomainPtr domain G_GNUC_UNUS= ED) } =20 =20 - static int hypervDomainManagedSave(virDomainPtr domain, unsigned int flags) { @@ -1657,7 +1634,6 @@ hypervDomainManagedSave(virDomainPtr domain, unsigned= int flags) } =20 =20 - static int hypervDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags) { @@ -1680,7 +1656,6 @@ hypervDomainHasManagedSaveImage(virDomainPtr domain, = unsigned int flags) } =20 =20 - static int hypervDomainManagedSaveRemove(virDomainPtr domain, unsigned int flags) { @@ -2099,7 +2074,6 @@ static virHypervisorDriver hypervHypervisorDriver =3D= { }; =20 =20 - static void hypervDebugHandler(const char *message, debug_level_e level, void *user_data G_GNUC_UNUSED) diff --git a/src/hyperv/hyperv_util.c b/src/hyperv/hyperv_util.c index 56c9e8bebd..d8a6e6cf5c 100644 --- a/src/hyperv/hyperv_util.c +++ b/src/hyperv/hyperv_util.c @@ -82,7 +82,6 @@ hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri) } =20 =20 - void hypervFreeParsedUri(hypervParsedUri **parsedUri) { diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 29447b8f0f..8c30370a7b 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -85,6 +85,7 @@ hypervGetWmiClassInfo(hypervPrivate *priv, hypervWmiClass= InfoListPtr list, return -1; } =20 + int hypervGetWmiClassList(hypervPrivate *priv, hypervWmiClassInfoListPtr wmiIn= fo, virBufferPtr query, hypervObject **wmiClass) @@ -97,6 +98,7 @@ hypervGetWmiClassList(hypervPrivate *priv, hypervWmiClass= InfoListPtr wmiInfo, return hypervEnumAndPull(priv, &wqlQuery, wmiClass); } =20 + int hypervVerifyResponse(WsManClient *client, WsXmlDocH response, const char *detail) @@ -192,6 +194,7 @@ hypervCreateInvokeParamsList(hypervPrivate *priv, const= char *method, return params; } =20 + /* * hypervFreeInvokeParams: * @params: Params object to be freed @@ -228,6 +231,7 @@ hypervFreeInvokeParams(hypervInvokeParamsListPtr params) VIR_FREE(params); } =20 + static inline int hypervCheckParams(hypervInvokeParamsListPtr params) { @@ -239,6 +243,7 @@ hypervCheckParams(hypervInvokeParamsListPtr params) return 0; } =20 + /* * hypervAddSimpleParam: * @params: Params object to add to @@ -270,6 +275,7 @@ hypervAddSimpleParam(hypervInvokeParamsListPtr params, = const char *name, return 0; } =20 + /* * hypervAddEprParam: * @params: Params object to add to @@ -302,6 +308,7 @@ hypervAddEprParam(hypervInvokeParamsListPtr params, con= st char *name, return 0; } =20 + /* * hypervCreateEmbeddedParam: * @priv: hypervPrivate object associated with the connection @@ -368,6 +375,7 @@ hypervSetEmbeddedProperty(virHashTablePtr table, return virHashUpdateEntry(table, name, (void*) value); } =20 + /* * hypervAddEmbeddedParam: * @params: Params list to add to @@ -410,6 +418,7 @@ hypervAddEmbeddedParam(hypervInvokeParamsListPtr params, return 0; } =20 + /* * hypervFreeEmbeddedParam: * @param: Pointer to embedded param to free @@ -422,10 +431,10 @@ hypervFreeEmbeddedParam(virHashTablePtr p) virHashFree(p); } =20 + /* * Serializing parameters to XML and invoking methods */ - static int hypervGetCimTypeInfo(hypervCimTypePtr typemap, const char *name, hypervCimTypePtr *property) @@ -480,6 +489,7 @@ hypervCreateInvokeXmlDoc(hypervInvokeParamsListPtr para= ms, WsXmlDocH *docRoot) return result; } =20 + static int hypervSerializeSimpleParam(hypervParamPtr p, const char *resourceUri, WsXmlNodeH *methodNode) @@ -497,6 +507,7 @@ hypervSerializeSimpleParam(hypervParamPtr p, const char= *resourceUri, return 0; } =20 + static int hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv, const char *resourceUri, WsXmlNodeH *methodNode) @@ -620,6 +631,7 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate= *priv, return result; } =20 + static int hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri, WsXmlNodeH *methodNode) @@ -1124,6 +1136,7 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQuery= Ptr wqlQuery, return result; } =20 + void hypervFreeObject(hypervPrivate *priv G_GNUC_UNUSED, hypervObject *object) { @@ -1236,7 +1249,6 @@ hypervReturnCodeToString(int returnCode) } =20 =20 - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *= * * * Msvm_ComputerSystem */ @@ -1385,6 +1397,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virD= omainPtr domain, return result; } =20 + int hypervMsvmComputerSystemEnabledStateToDomainState (Msvm_ComputerSystem *computerSystem) @@ -1422,6 +1435,7 @@ hypervMsvmComputerSystemEnabledStateToDomainState } } =20 + bool hypervIsMsvmComputerSystemActive(Msvm_ComputerSystem *computerSystem, bool *in_transition) @@ -1461,6 +1475,7 @@ hypervIsMsvmComputerSystemActive(Msvm_ComputerSystem = *computerSystem, } } =20 + int hypervMsvmComputerSystemToDomain(virConnectPtr conn, Msvm_ComputerSystem *computerSystem, @@ -1489,6 +1504,7 @@ hypervMsvmComputerSystemToDomain(virConnectPtr conn, return *domain ? 0 : -1; } =20 + int hypervMsvmComputerSystemFromDomain(virDomainPtr domain, Msvm_ComputerSystem **computerSystem) --=20 2.26.2