From nobody Thu Nov 13 02:01:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1575569089; cv=none; d=zohomail.com; s=zohoarc; b=O59eZiP1zIF3wE8GmLZ2wsF+RilJmhmmTm7qejUcieBz48r70f7X9zMMsUKdNuCixLcFzsxOixUtGDvldfyopnuMGp0rzNe4sOsmZyNLUC9xxzGobn3LeboTfNvyipReLh/RZa7Nd22NlT4V7yir5jXyQUKMNg127sLa8/wx5zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575569089; h=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=eLVgGpQSBy02aDeEsma6Ew8A6F+jyzMerXSJDOLNkHA=; b=KApJkbWJVAYZyMvmobRTFmPm/pd+UTH5/uPoZ9Rfoqop9fqcxJJFSupBd6gdrc+LZUUBFq5mo3baekHpyr5enQyhCJFWQH0wsInCCA6aZiDgfYLF2kVnB3aqGTYpqCAIZ3VqahpMFJX6WhhqTXCpMRA7kUq0EmSLgzqv0dN5BUw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15755690895541.5319008167069796; Thu, 5 Dec 2019 10:04:49 -0800 (PST) Received: from localhost ([::1]:58990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icvUd-0001IZ-Mi for importer@patchew.org; Thu, 05 Dec 2019 13:04:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icvDZ-00081K-OO for qemu-devel@nongnu.org; Thu, 05 Dec 2019 12:47:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icvDY-0004m0-IK for qemu-devel@nongnu.org; Thu, 05 Dec 2019 12:47:09 -0500 Received: from relay.sw.ru ([185.231.240.75]:48338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1icvDX-0003VM-VB; Thu, 05 Dec 2019 12:47:08 -0500 Received: from vovaso.qa.sw.ru ([10.94.3.0] helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1icvD6-00013M-VF; Thu, 05 Dec 2019 20:46:40 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v8 07/21] ppc: well form kvmppc_hint_smt_possible error hint helper Date: Thu, 5 Dec 2019 20:46:21 +0300 Message-Id: <20191205174635.18758-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191205174635.18758-1-vsementsov@virtuozzo.com> References: <20191205174635.18758-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vsementsov@virtuozzo.com, qemu-ppc@nongnu.org, armbru@redhat.com, David Gibson , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Make kvmppc_hint_smt_possible hint append helper well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on already existent error object. Rename function to be kvmppc_error_append_*_hint. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Acked-by: David Gibson Reviewed-by: Markus Armbruster --- target/ppc/kvm_ppc.h | 4 ++-- hw/ppc/spapr.c | 2 +- target/ppc/kvm.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 98bd7d5da6..f22daabf51 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -28,7 +28,7 @@ void kvmppc_set_papr(PowerPCCPU *cpu); int kvmppc_set_compat(PowerPCCPU *cpu, uint32_t compat_pvr); void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy); int kvmppc_smt_threads(void); -void kvmppc_hint_smt_possible(Error **errp); +void kvmppc_error_append_smt_possible_hint(Error *const *errp); int kvmppc_set_smt_threads(int smt); int kvmppc_clear_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits); int kvmppc_or_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits); @@ -164,7 +164,7 @@ static inline int kvmppc_smt_threads(void) return 1; } =20 -static inline void kvmppc_hint_smt_possible(Error **errp) +static inline void kvmppc_error_append_smt_possible_hint(Error *const *err= p) { return; } diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e076f6023c..1b87eb0ffd 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2564,7 +2564,7 @@ static void spapr_set_vsmt_mode(SpaprMachineState *sp= apr, Error **errp) " requires the use of VSMT mode %d.\= n", smp_threads, kvm_smt, spapr->vsmt); } - kvmppc_hint_smt_possible(&local_err); + kvmppc_error_append_smt_possible_hint(&local_err); goto out; } } diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index c77f9848ec..27ea3ce535 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2076,7 +2076,7 @@ int kvmppc_set_smt_threads(int smt) return ret; } =20 -void kvmppc_hint_smt_possible(Error **errp) +void kvmppc_error_append_smt_possible_hint(Error *const *errp) { int i; GString *g; --=20 2.21.0