From patchwork Thu Jan 2 15:12:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854659 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7822339wrq; Thu, 2 Jan 2025 07:15:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWmymollahS2f5UrybLOU5SSSa1rk5gL8Qa+OLEIJNeG5kMuSR78W2NBNa4Z2AGuSU/IgoK0w==@linaro.org X-Google-Smtp-Source: AGHT+IGe1qmD48sIsGoTaguwdJuZ4UUwu/GiuXCoAppZ7aosu0/kOiM4m/2KpJK2/ez6oP0sOES7 X-Received: by 2002:a05:620a:319e:b0:7a9:bd5b:eb61 with SMTP id af79cd13be357-7b9ba79acd1mr7490048485a.27.1735830919473; Thu, 02 Jan 2025 07:15:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735830919; cv=none; d=google.com; s=arc-20240605; b=ZZTDaGkrnALNphWb4Nqiseo3OfooMZ389HJIhO40IMhWjo3kzb3SBBnh+hdL5dxXTu 0fdaGQAVcHfBgwDnNYOAJQg7euVozx4MyhkUbc0K1REpOrTCmbejoe54SwfWfgxw7HjT es63HvvJRyX315Ih+5iK5JLrV1b1dHHAbo8xqXr+lgZiP4rhKJa0cTpu7yoWsBKN8ugm 3ZRDOkkFc21Hlj/ScX06Qli/51TQ95sGXsk1SDohmnXCi1HVFIB/y/VBp/8OvAlvVLfl m6/UdQ2dG81kdOQbmCYhVVBVXNdZZa3Y33kMg3f6Usj1YxdycPU0yZzpVNfYgZ57bqz3 fb5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X072cNLxlYU70g0aPAnHdJmyEbpQKTIAoLkN1KVyvsY=; fh=PTspa9wvhkaR6hEChXR5orGauuRbRK309fOYTYlWOh4=; b=JDDE4VXe5IZ53ywYpq4HvMcmH8Xq4Sa0oJcoZRhAo1C3CcQa54vmyGECcE5JPGWLbe 7QBACs7GtiMpqnanoqeQ/vUHFUQGmGE1mY7XMOtaprla+n/FyA9WlMaUCa7edrvTW/Qs epw6bMHSryRSVlGcmBVCJBPH24ddX2Cj8cR6xL9jl/jxqSKxmLlKL1OFT2HSw149eBdA QN/GQS4lJ0Oobul/R7Pu7oI4Elv3OCtzKh/1IuFX1+NbNo0tsVzOJcB7O1GA1APqfZbO 9j6H5WeroBmVfRzo+r6+Hr4eVK6mzSu39QNA10iiSdsYaAbx3/4sdqJMpIUG7d+LoLi8 bj2g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EFO5XO44; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2ce225si3492949485a.148.2025.01.02.07.15.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 07:15:19 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EFO5XO44; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTMtJ-0007oJ-6n; Thu, 02 Jan 2025 10:13:41 -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 1tTMtF-0007lb-Uz for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:13:37 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTMtD-0006bt-Id for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:13:37 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso75383545e9.3 for ; Thu, 02 Jan 2025 07:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735830813; x=1736435613; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X072cNLxlYU70g0aPAnHdJmyEbpQKTIAoLkN1KVyvsY=; b=EFO5XO44gR26r4cYHKY0KNr+vrDhzfNlxI9NMB9xhXJgYSCeOzGJ0z+LVHehVUHabw eNrhr+SHefysIzTlfWgsXLR+kctg0X4+pc453eTh8LFjd6iRKhd7YLyd4LYSj7c9nKmt jJKALFu/0o5Z4l1pFY6JA3LJSMOW3R7s0SWmRZoNt52bexWcfRdPItX2y+F+2jh0bfLH 6dXzr/knHMaKJURMO2iUT/wpOMaHOUnQSZWRQcRoQUZohKZIYSXa3RDZ0ArlI1YuBx0n q52larNPa2CGbLx2h+p4FonbLzTpwq7Dk1lytoWinoYw1DPgLcC8dUq6jsRLLOipPtCa 1uqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735830813; x=1736435613; 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=X072cNLxlYU70g0aPAnHdJmyEbpQKTIAoLkN1KVyvsY=; b=f91IHZ+t7NWuXZE32x08kObrRyITrXiUHyiWfaJI5FS+lbeZUrfPuNgAtNZY447to+ Dsc7z8yk4CpzzPZsoE2pOCYxBSkufdwsUYB2hmW1bi+/NQxAMAYchbQm41ZmF/mxhclq blm4776GLgK80gk/F5424JDISWMNQ+jsqk2+GZUGg/cz5gR8qoH3tg3qCxPwbaZjqnGz geV4Gm7Ha8D3jFu0wWj7ltfj6k9AQYd3ofRAoNixJpAEqy7ovLkp9NrobC1ve49uX0Ck hSCSwflHmQf4QgucPWhfTKzyKiDE4kEd81r1NoBVBgHgxM45Kaz/JT8SCEVy+4zvv3Yv 5v9g== X-Gm-Message-State: AOJu0YyhWWL321gBx1JckmXD3c8uqLv9Q1dpg7Q27tV7ysxAviiJZWNq 8u4ujsyhCdTuPRSZxhGOjuL8KYVH6LJraxyLC/FtinsuQg1uGyj9Y4AlHDNF90/8scbV3vSJ4Bw ljlU7Mw== X-Gm-Gg: ASbGncv3zz5TX17FmMasFk619XalIXcIa+OFK6aGSIi6CLPqD+yVXtNy4U0C7XkVO/F mogUmezLHHyr9LaMf5DUvSXbPrgjF5fNeJ2dO2qeikNnaj4KwhQAeJukmiKDnjVyd+RlppzH7sX bRoYptd7BcDHc4dQuyyShkd7/UFoT/5PkK058YT4+VG1xnFGUOHsv+Gh190r3ORajzILfOcgh3Y JIYuKkT/zcEJtaSC3pFv4/N0jgErqDl6q4F51zSxJiQr29rZ1cSUM7PP1eRG8qeUb22/u5GMbOJ VcM0oRoyZYRh041O2vdPL396blUZGBw= X-Received: by 2002:a05:600c:138d:b0:434:a4fe:cd71 with SMTP id 5b1f17b1804b1-436686439e6mr414647125e9.12.1735830813541; Thu, 02 Jan 2025 07:13:33 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acb17sm37848716f8f.97.2025.01.02.07.13.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 07:13:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-block@nongnu.org, Marcel Apfelbaum , David Hildenbrand , "Michael S. Tsirkin" , Zhenwei Pi , Fam Zheng , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Peter Xu , Richard Henderson , Paolo Bonzini , "Gonglei (Arei)" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v3 09/10] qom: Remove container_get() Date: Thu, 2 Jan 2025 16:12:43 +0100 Message-ID: <20250102151244.59357-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102151244.59357-1-philmd@linaro.org> References: <20250102151244.59357-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Xu Now there's no user of container_get(), remove it. Signed-off-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20241121192202.4155849-14-peterx@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- 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 bcf9910b42c..77935572894 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -2017,17 +2017,6 @@ int object_child_foreach(Object *obj, int (*fn)(Object *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); /** * object_property_add_new_container: diff --git a/qom/container.c b/qom/container.c index 20ab74b0e8d..38a27ec1edd 100644 --- a/qom/container.c +++ b/qom/container.c @@ -34,27 +34,4 @@ Object *object_property_add_new_container(Object *obj, const char *name) return child; } -Object *container_get(Object *root, const char *path) -{ - Object *obj, *child; - char **parts; - int i; - - parts = g_strsplit(path, "/", 0); - assert(parts != NULL && parts[0] != NULL && !parts[0][0]); - obj = root; - - for (i = 1; parts[i] != NULL; i++, obj = child) { - child = object_resolve_path_component(obj, parts[i]); - if (!child) { - child = object_property_add_new_container(obj, parts[i]); - } - } - - g_strfreev(parts); - - return obj; -} - - type_init(container_register_types)