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 1530217076485386.6413139353158; Thu, 28 Jun 2018 13:17:56 -0700 (PDT) Received: from localhost ([::1]:38340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdMT-0000dW-2U for importer@patchew.org; Thu, 28 Jun 2018 16:17:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdAe-0007Fc-BR for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYdAd-0000VT-3d for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:36 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:36281) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYdAc-0000UE-Sf for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:35 -0400 Received: by mail-wr0-x22a.google.com with SMTP id f16-v6so6686837wrm.3 for ; Thu, 28 Jun 2018 13:05:34 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:05:33 -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=9Q0dN0FY1dujCdFHkQIpDdt3v5e4rTbvA8g7i9lgtTM=; b=RQWg6Jjx/ya6agmr2hWlufvuCL6/uVIx9gihBymhLTY2jRCOd6luWP7i75R02765qn bP2nvHHd9gz7EbSz5E2K1/tKPf8XvLKhy8wpAiTB2faxJfVaiVR0Bu31485SzaPsL6pr 2UL+kaujTqX/++IbaGVUGeytf26WSsXREqhnoFyoFenkeruFSiYpuHfmkdcVlrqqw0mB FUlSksBd+02/vTR0rFNWVToUwZibw++mDwf9Oe5LfeVr4/A/BVUNIKrtFzin6u92m2tn NfrgRSDJk425p2p/mViL9usA3KCX76nujk2/lxtZNKGQnhXXlq9nu+3QX7qR7xNdfoN9 KjKg== 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=9Q0dN0FY1dujCdFHkQIpDdt3v5e4rTbvA8g7i9lgtTM=; b=Kw0HUT7zb5600Dv+UszAEGx+EaYEYHG58peMLAXB+vEEain1qZXg+K0SQC2vTrhjkU L1JZ8uwPXuoNnJEJx3D3C/4+BwlE0o//EDksEtkGW0lqfOWcYLAkZk8K+P+HOWb4WbpK peqZt3NzR+IcHhEJlv9eyWE75knCgKoNbxJcCIMtPUUcTrVZqyBct/ELxLcSsAklu6pi sa5v4laI6Bur+R0bhaWmGgX65fS5HVWTxWCtPk0YHlCTh6liKKCyO2YruzhdJHsSYP+h Zam0yUMkhaihskJqD4a5o4zgdQQVrPe+tBmQvN8KdBEn+W2v3QdZE1Xf0rAuqIECcaoA dvkA== X-Gm-Message-State: APt69E2aYyfu3Djle4d+xCb9jNJHVMTzQhe/hDD1zvLSy/l2GfxXlyQo 4TjVsP63DdJnrzpwHT9AWGA/3BUU X-Google-Smtp-Source: AAOMgpfzxH9QMMgrYpUx+I7s2FplINwN6B1MtnBf2W0d+7JXX8eqedCLxdMep10zdBQJexDjItJxYg== X-Received: by 2002:adf:8188:: with SMTP id 8-v6mr10259105wra.89.1530216333520; Thu, 28 Jun 2018 13:05:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 22:04:30 +0200 Message-Id: <1530216310-52873-21-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::22a Subject: [Qemu-devel] [PULL 20/60] pc-dimm: remove pc_dimm_get_free_slot() from header 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 Not used outside of pc-dimm.c and there shouldn't be other users. If other devices (e.g. memory devices) ever have to also use slots, then we will have to factor this out. Reviewed-by: Igor Mammedov Reviewed-by: David Gibson Signed-off-by: David Hildenbrand Message-Id: <20180619134141.29478-5-david@redhat.com> Signed-off-by: Paolo Bonzini --- hw/mem/pc-dimm.c | 4 +++- include/hw/mem/pc-dimm.h | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 9e0c83e..7387963 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -27,6 +27,8 @@ #include "sysemu/numa.h" #include "trace.h" =20 +static int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **e= rrp); + void pc_dimm_plug(DeviceState *dev, MachineState *machine, uint64_t align, Error **errp) { @@ -111,7 +113,7 @@ static int pc_dimm_slot2bitmap(Object *obj, void *opaqu= e) return 0; } =20 -int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp) +static int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **e= rrp) { unsigned long *bitmap; int slot =3D 0; diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 860343d..cf71247 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -76,8 +76,6 @@ typedef struct PCDIMMDeviceClass { MemoryRegion *(*get_vmstate_memory_region)(PCDIMMDevice *dimm); } PCDIMMDeviceClass; =20 -int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp); - void pc_dimm_plug(DeviceState *dev, MachineState *machine, uint64_t align, Error **errp); void pc_dimm_unplug(DeviceState *dev, MachineState *machine); --=20 1.8.3.1