From nobody Sat Nov 23 18:01:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732216978; cv=none; d=zohomail.com; s=zohoarc; b=XJnKkYjunoIQj0WzLYfQRmADSeuhPs0o/PAdvdw8naMDCetSI9+WhnXsB+JitBnVXCz6pVIMPs+PEaUxNuhxc2f7VGu9ZeUIGE3ShAKeGAKzBQwL1x4mXy7CYmcRSAbbIBzGUQlEG+rfRUJ8O7fO+IOMPgsEJGAPiApdAPy/3+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732216978; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=09qVDtV8+X8joyoLsYEjsugdMH7ZxlNybCqke+Rx6OQ=; b=QD97Ba4O1nE8nV3sQE4rdmBYTyoWdDO7haL54PnbdDh9w6+dg+59wn69PF5gj/IT3n7KVePGE/o6oj8wKgtNiGQMZtq34z9idOzukCRsVlvGKMg8DspGKjAANcw8Hb7143JfJJ3NwSa+RbBYBdl+VvR4KqaACkyRL67wpv5MPwk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732216978398811.6311693107465; Thu, 21 Nov 2024 11:22:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tECl8-0006So-8O; Thu, 21 Nov 2024 14:22:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tECl5-0006SJ-Gm for qemu-devel@nongnu.org; Thu, 21 Nov 2024 14:22:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tECl3-0002Yf-P4 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 14:22:31 -0500 Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-len4P6ppNjuPe2WspEB_EQ-1; Thu, 21 Nov 2024 14:22:28 -0500 Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-83ab369a523so126975639f.3 for ; Thu, 21 Nov 2024 11:22:28 -0800 (PST) Received: from x1n.redhat.com (pool-99-254-114-190.cpe.net.cable.rogers.com. [99.254.114.190]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e1cfe345f0sm102939173.45.2024.11.21.11.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 11:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732216949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=09qVDtV8+X8joyoLsYEjsugdMH7ZxlNybCqke+Rx6OQ=; b=PKT2mvxBtpO6WfQtqeW2+vqRniw9YkcP4mvda9NYKsgQcmIB8n6UrYGeIuBo1V9lAxEwVo 3TWMAwsfZ26a5J6BUM/Av+usCo20HEblFdPX4q1KZRbRlBaLpvB00gw03nPGv5I4qK3WXm BgIW7gKw0JCcpOwBxgCVAmn7RLjY9FI= X-MC-Unique: len4P6ppNjuPe2WspEB_EQ-1 X-Mimecast-MFC-AGG-ID: len4P6ppNjuPe2WspEB_EQ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732216947; x=1732821747; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=09qVDtV8+X8joyoLsYEjsugdMH7ZxlNybCqke+Rx6OQ=; b=mRWbChEsNHLULfQvoOHEaRk13dEk82Ecs7x72XDuZ9q7arV0/kP4Yq8snUuIyvOhqi cErxAwaORkcdkEUGxTXKZlgyLxUG1gM7xznEuR8PSWaFIKv5bRIOOj+sQ+xbFAg39ICz cUDx56nLPxVyJWVHambOURx8GoT682JN3nuqoi1eGV7+Lpq/GSvnv/RMvt64jyZUEp2j fQWI8RqriotS8uc+KIrk6Y5T6zutCif7UCPpFbOLV876yMB9Ry/qPfB9/cAHwL4MBnOW 4u999vS1+cFwwPu//F45P1Yw/T00l9Yq+ZfHq42TK2oXJ1I66MSBfyDOTRCtl//XwOfv sKyw== X-Gm-Message-State: AOJu0Yw8iqoRXfCvuwAPkJrZrCJ423wKED+j8nOmb5ykUC40yx6cUC+9 pder35aWlsNmlfHqLk0tWkdpnewgYG14bPpGubVYQJX3B68U23tfTVdg096YcOA2yK0qvO8ugcG GchxPMtVihpBew6yHVuArU5EogwcYZqgp7Uesamr+24gnAaYSXR/L3pqO6uZTUHBcKX4rj1eimA 4L+FjPmYMIMh7swYdTqnQ8SOXsdtbbBFCeXw== X-Gm-Gg: ASbGncuBmB887nC8Mrp/Pyd5frjdwZdqwIaEU7drbBPUCqmUATUIQVynhDLprLHnptI OyKiltm+R6sVbtQAtggms5iu/4zm6Vv7gHDFpaW9TOy+dTDfC82Hxo5AWmtOhODYMQuGjc4iWqM /amCrCNK6uCu9ACaPclG1GaUrHOHFvunGfTWjqi1gGevL8ArZvFGf0Vg/NQWo2AU9wBy6jf0g4b Gpo7G2f5H7Kw3ISLM0qbXhMHglprMyq1klqGgZasVD0ZjOSd/g57KflCyK2beikuMDz1dbSTH++ onVWow5C855Bwi/PAbKO6f9HaQ== X-Received: by 2002:a05:6602:154d:b0:83a:872f:4b98 with SMTP id ca18e2360f4ac-83ecdc44f29mr10843739f.2.1732216947123; Thu, 21 Nov 2024 11:22:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGdfiMZqSHprSPJo6ciJj7VtcqnP9zLzTP0uWTYoy3dP0ye2D7P7kHsUqOzEA56o8WYjW8VA== X-Received: by 2002:a05:6602:154d:b0:83a:872f:4b98 with SMTP id ca18e2360f4ac-83ecdc44f29mr10841439f.2.1732216946834; Thu, 21 Nov 2024 11:22:26 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster , Peter Maydell , Juraj Marcin , peterx@redhat.com, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Fabiano Rosas , Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost Subject: [PATCH v2 13/13] qom: Remove container_get() Date: Thu, 21 Nov 2024 14:22:02 -0500 Message-ID: <20241121192202.4155849-14-peterx@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241121192202.4155849-1-peterx@redhat.com> References: <20241121192202.4155849-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732216978798116600 Content-Type: text/plain; charset="utf-8" Now there's no user of container_get(), remove it. Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qom/object.h | 11 ----------- qom/container.c | 23 ----------------------- 2 files changed, 34 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 4eeee7f7c4..f3a887e34f 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -2031,17 +2031,6 @@ int object_child_foreach(Object *obj, int (*fn)(Obje= ct *child, void *opaque), int object_child_foreach_recursive(Object *obj, int (*fn)(Object *child, void *opaque), void *opaque); -/** - * container_get: - * @root: root of the #path, e.g., object_get_root() - * @path: path to the container - * - * Return a container object whose path is @path. Create more containers - * along the path if necessary. - * - * Returns: the container object. - */ -Object *container_get(Object *root, const char *path); =20 /** * object_property_add_new_container: diff --git a/qom/container.c b/qom/container.c index 20ab74b0e8..38a27ec1ed 100644 --- a/qom/container.c +++ b/qom/container.c @@ -34,27 +34,4 @@ Object *object_property_add_new_container(Object *obj, c= onst char *name) return child; } =20 -Object *container_get(Object *root, const char *path) -{ - Object *obj, *child; - char **parts; - int i; - - parts =3D g_strsplit(path, "/", 0); - assert(parts !=3D NULL && parts[0] !=3D NULL && !parts[0][0]); - obj =3D root; - - for (i =3D 1; parts[i] !=3D NULL; i++, obj =3D child) { - child =3D object_resolve_path_component(obj, parts[i]); - if (!child) { - child =3D object_property_add_new_container(obj, parts[i]); - } - } - - g_strfreev(parts); - - return obj; -} - - type_init(container_register_types) --=20 2.45.0