From nobody Tue Nov 4 15:26:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530217370798476.08788111033846; Thu, 28 Jun 2018 13:22:50 -0700 (PDT) Received: from localhost ([::1]:38371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdRG-0004XC-EX for importer@patchew.org; Thu, 28 Jun 2018 16:22:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdAh-0007Hk-Jq for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYdAg-0000bA-DV for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:39 -0400 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:42010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYdAg-0000aB-2x for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:38 -0400 Received: by mail-wr0-x22e.google.com with SMTP id p1-v6so6689204wrs.9 for ; Thu, 28 Jun 2018 13:05:37 -0700 (PDT) Received: from 640k.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 127-v6sm6211110wmd.18.2018.06.28.13.05.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=/vFXuwJ9Iby1cM5bAqhnlf3ZGlZGZOceNi5Fs9aajoA=; b=nAlCmGr51AND1+vRd2lhk1dVFhu8tnxO8uKbplqmnoMRlCmoAeVO4HD1ZjJapTE8Do MsLqXg0vkl5s0Kbb8J8l2KnAiNIDWZ6zwWCas90x4PtjL6a2Z6M+kClFFp+jPllkANpp 4Q8rbKhbV7xGwQ+d4Mc0y21nu+MsTQa3MfX4iDtjo/cCxJVg6BR8aHBKLdMiUo2WsgHA F4ZChrKqIi6roYZs/fQnPW/mAR4LnBZViv+eUcU2vA1dg0myb5yaSneGiqFlsXB9wCVl d3pe/8jlVB5MDi4csnu2pHhpiEr5EQZsAay/J9kOi5kI2vEwFuqs9SPYNJXO0CEShsVw ur/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=/vFXuwJ9Iby1cM5bAqhnlf3ZGlZGZOceNi5Fs9aajoA=; b=ksA4+jsk83k2DRmjhzEKLDrSOtevelt2rXmbuEykIKYWhqANnItEbMqOFyAfpV1ZT0 BwpkBvnZrTU8RBQ9HjQ6yy+40vdhnbROvLJOthyKMRbAlDIn8cS5kNiVupzV90vuPpqv GMVQgVXiEOpVLLzZDtAxclQ2V2GeV0xs9kooMZz5BNNkwwzfnsNHE51f30yw5+5cEOXN UsSNwfY1+Qb3OlTKWxFPqS4PPv0wkVvjnFsOLkWy8X+o4lZl/1gDVgcBeU9/1p0Ls5dg xkgZ23BzUmAg0v57r4BNQ2h4RnXDhzT4yQMN26tDe3+RDV8X81RJspXLvrljY+4YLROD 5Efw== X-Gm-Message-State: APt69E0HTMLvXTvq1zyjqXAViZ2/cn/Rl+PAaDFtbus88D/12DOSNI87 NTqpWv5AyvG4vgqSRqNnl3PtrGX1 X-Google-Smtp-Source: AAOMgpeuxx4jSivUFsMVDMGm5MQkzaCLpvaOq4RQa/8/0QRtIBISQ3X7dRjJdF7JGgomlsbtzTQy2A== X-Received: by 2002:adf:f08e:: with SMTP id n14-v6mr10153838wro.49.1530216336751; Thu, 28 Jun 2018 13:05:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 22:04:33 +0200 Message-Id: <1530216310-52873-24-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> References: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22e Subject: [Qemu-devel] [PULL 23/60] hostmem: drop error variable from host_memory_backend_get_memory() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Hildenbrand Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: David Hildenbrand Unused, so let's remove it. Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Signed-off-by: David Hildenbrand Message-Id: <20180619134141.29478-8-david@redhat.com> Signed-off-by: Paolo Bonzini --- backends/hostmem.c | 3 +-- hw/mem/nvdimm.c | 4 ++-- hw/mem/pc-dimm.c | 4 ++-- hw/misc/ivshmem.c | 3 +-- include/sysemu/hostmem.h | 3 +-- numa.c | 3 +-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index 3627e61..4908946 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -247,8 +247,7 @@ bool host_memory_backend_mr_inited(HostMemoryBackend *b= ackend) return memory_region_size(&backend->mr) !=3D 0; } =20 -MemoryRegion * -host_memory_backend_get_memory(HostMemoryBackend *backend, Error **errp) +MemoryRegion *host_memory_backend_get_memory(HostMemoryBackend *backend) { return host_memory_backend_mr_inited(backend) ? &backend->mr : NULL; } diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index f974acc..df97162 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -105,7 +105,7 @@ static MemoryRegion *nvdimm_get_memory_region(PCDIMMDev= ice *dimm, Error **errp) =20 static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp) { - MemoryRegion *mr =3D host_memory_backend_get_memory(dimm->hostmem, err= p); + MemoryRegion *mr =3D host_memory_backend_get_memory(dimm->hostmem); NVDIMMDevice *nvdimm =3D NVDIMM(dimm); uint64_t align, pmem_size, size =3D memory_region_size(mr); =20 @@ -161,7 +161,7 @@ static void nvdimm_write_label_data(NVDIMMDevice *nvdim= m, const void *buf, =20 memcpy(nvdimm->label_data + offset, buf, size); =20 - mr =3D host_memory_backend_get_memory(dimm->hostmem, &error_abort); + mr =3D host_memory_backend_get_memory(dimm->hostmem); backend_offset =3D memory_region_size(mr) - nvdimm->label_size + offse= t; memory_region_set_dirty(mr, backend_offset, size); } diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 7387963..73f0eee 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -226,12 +226,12 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMM= Device *dimm, Error **errp) return NULL; } =20 - return host_memory_backend_get_memory(dimm->hostmem, errp); + return host_memory_backend_get_memory(dimm->hostmem); } =20 static MemoryRegion *pc_dimm_get_vmstate_memory_region(PCDIMMDevice *dimm) { - return host_memory_backend_get_memory(dimm->hostmem, &error_abort); + return host_memory_backend_get_memory(dimm->hostmem); } =20 static uint64_t pc_dimm_md_get_addr(const MemoryDeviceState *md) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 16f0370..ee01c5e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -909,8 +909,7 @@ static void ivshmem_common_realize(PCIDevice *dev, Erro= r **errp) if (s->hostmem !=3D NULL) { IVSHMEM_DPRINTF("using hostmem\n"); =20 - s->ivshmem_bar2 =3D host_memory_backend_get_memory(s->hostmem, - &error_abort); + s->ivshmem_bar2 =3D host_memory_backend_get_memory(s->hostmem); } else { Chardev *chr =3D qemu_chr_fe_get_driver(&s->server_chr); assert(chr); diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index 5beb0ef..6e6bd2c 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -62,8 +62,7 @@ struct HostMemoryBackend { }; =20 bool host_memory_backend_mr_inited(HostMemoryBackend *backend); -MemoryRegion *host_memory_backend_get_memory(HostMemoryBackend *backend, - Error **errp); +MemoryRegion *host_memory_backend_get_memory(HostMemoryBackend *backend); =20 void host_memory_backend_set_mapped(HostMemoryBackend *backend, bool mappe= d); bool host_memory_backend_is_mapped(HostMemoryBackend *backend); diff --git a/numa.c b/numa.c index 33572bf..94f758c 100644 --- a/numa.c +++ b/numa.c @@ -523,8 +523,7 @@ void memory_region_allocate_system_memory(MemoryRegion = *mr, Object *owner, if (!backend) { continue; } - MemoryRegion *seg =3D host_memory_backend_get_memory(backend, - &error_fatal); + MemoryRegion *seg =3D host_memory_backend_get_memory(backend); =20 if (memory_region_is_mapped(seg)) { char *path =3D object_get_canonical_path_component(OBJECT(back= end)); --=20 1.8.3.1