Message ID | 20250102151244.59357-11-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7822335wrq; Thu, 2 Jan 2025 07:15:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU79xpjJLZMFSNer8lPVWr8LAMTRO3pOfMCH7dTQPGvHDBigbZ1gKMLAZIOo/Y7zMUy/s5x9g==@linaro.org X-Google-Smtp-Source: AGHT+IHlNElF4PALFaB1u1vlGWb0poyPrLkzj01HfhzWaKid+TrwkPc/BW9FU7sTocxIFYQtls/0 X-Received: by 2002:a05:620a:2608:b0:7b6:da21:751c with SMTP id af79cd13be357-7b9ba6fd997mr6486546385a.11.1735830919129; 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=K+kuIQpd2HIJvR+Gle4EYairNRfKHDVwgiAcCDskAPETmmVsZq0gPMT69lPYjYboyA QlZSOpWBg2/gZr7pyfCYUV0r+DaT2faVEd/Kfw2ioUYg6YTdJLK8a1+FIyI2yZdrxQ4a rG2SRt3LyNdQejkVFreJ5DEVONpgr/EOpAQALF0e5pVnmJTPmrCkqmzVSOtWNANnF++g pWNCUfCaXgWo5tN+dYC1i7OypReC1ppw1LxJS0/JUhsdjPVj1JGCndtDakOhNNmP7Uig pa7qHZhpC8ATofK547i1OwBvIld9xJClLOO4oTL0LhxZvmBjKZ5M1G89eNYJ63LU3+l4 lL+g== 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=W41W/Tl402O4BPcR7bbkn9vt12o0/ypJh/X89Ny0z9A=; fh=PTspa9wvhkaR6hEChXR5orGauuRbRK309fOYTYlWOh4=; b=Y3xPNfcUshGiLszqnfxVI7aq42rOVJ2JMlS7vYDp/NGVI9Ls4cvNEnkj32etyL579f ae5G1mdLNSAoVTW1TvNjZbgXikpkB5jD+J4mUT0K5iDwbqDLwwLlIt0ReTvRqw0Qd7yj x5P8d6QxcYJpwB4ioSscdjrwp5kPnh+iRUQ5F54XaIdFNFgOkybZRwEayj03AD+TpRdE yt+v8CBtOL6se2dwTyqs/ONbRQRv+cmnDmSD+pQY5/jG/Z4M0cnDjDGuJ9cLAHd/cM3I nQOcysuEob34cxJIlYjaA3ziYklxvRsV3Ng4xr4s3BX8+ahjf0AVXrk/D3dsu4D/5jbb n2aw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uXV7posb; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac478d17si3246433485a.221.2025.01.02.07.15.18 for <patch@linaro.org> (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=uXV7posb; 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 <qemu-devel-bounces@nongnu.org>) id 1tTMtN-0007pe-Bi; Thu, 02 Jan 2025 10:13:45 -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 <philmd@linaro.org>) id 1tTMtK-0007oZ-Mj for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:13:42 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tTMtI-0006dn-JZ for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:13:42 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3862d16b4f5so7129239f8f.0 for <qemu-devel@nongnu.org>; Thu, 02 Jan 2025 07:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735830818; x=1736435618; 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=W41W/Tl402O4BPcR7bbkn9vt12o0/ypJh/X89Ny0z9A=; b=uXV7posbXSM7jD0jdFdmG0DPGzUUIeFdHx/6s4BwfoWyNz14s7TubHd5MEhawbYvYd 2YANSNCmSTK/NMJiY4uKpDr4oUgDqHCxVkUdcZY5cKSi/lr37AFpLA7+/9d3R5SabOY1 LaWo1eN1C/o6MdrBET4qOsU2D7GS7LtOvH0opwY2080vf/4LA65SgsHfVQ8PmnyCXpOh 1QTJR9kvrYCMm5aZajd8W2zI9A0jAUE+4h8Necy/TQOVdlXUZAW8ySCoc+ouRZGp7Zti 0UTD6EDTdBWYXwVDfmA1+9aUfqP6Tt0veLNGXrHIAxzi8BKGBCgywHsWDsBEVaGzEp5R N4Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735830818; x=1736435618; 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=W41W/Tl402O4BPcR7bbkn9vt12o0/ypJh/X89Ny0z9A=; b=Mh2sCdPdul1cRuWAIUARis9YdRd05ITi8QuJHjeXeRgkoeu+ocWZ1bgoo1OPja8p1a RMZaay8y/z9s18q7Le/O2y8SYQqLo2TQ+UzSEIzPpe+VYfWHxThPnFD4BLPYTbjzeQRb OMBg6Sd9CiSoYalDoZGC3W8lvPEVeY0aXS35oIbwQ5ea0aUFh7XboQZBx2yPESB/NMSS iKbP7BfngWY0dPaXvBD7pGPN5t3X8iZVZbF+m8PRRtS++iop5cSM+DexHknylp6Agb2O g9jJoxmYvogJBdssvNPLK+lQX28OH3BABvOPEk4OWOwq1N9WTDdT6bcAL5p4kJFUKPwq 3i0w== X-Gm-Message-State: AOJu0Yy1nIUdze3uOWC8xnku8hk5P92ToSL1LSTN+IPqEewIYsJUAmnq YZmgVnxyoSqwzUc3aAOl3Xcu3m6jRYwCCokLS8xJ/ocaEd09S8I95e154kMw6aWZOLkCJaJwoa0 nkim/ig== X-Gm-Gg: ASbGnctUWG8ZaMu8u0NHQjGoto8ki8woVkfM0vGckdbmdRvQyEV/gFvkwL5bCiQFHmD X3N3vVMp5H//dKzziaxoL1HpbW/sm7u5ej9LXuc7kSPf4cDJnjSUz7E/CFDJoyzdM210Xq/PvoH 40xZ/7BJjuV3PTdC5oWhuSiyuVdVILZBXZGda0zswMx91MO1q9WJplZLFxKOs7Eto/+kb9Qvis7 770JF9arjwFUlLY4C4AYqCcdx+aJBGCPHRqCQtkIFltEzm8ORQJz070jeeL+c9nJvJw/20H1x9D Hi58Iv5p2m5d2zxHvEZL9fU3u8Yg2kA= X-Received: by 2002:a05:6000:178d:b0:386:37f8:451c with SMTP id ffacd0b85a97d-38a1a1f74e2mr38158314f8f.1.1735830818553; Thu, 02 Jan 2025 07:13:38 -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-38a1c829235sm37735173f8f.15.2025.01.02.07.13.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 07:13:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Eduardo Habkost <eduardo@habkost.net>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, qemu-block@nongnu.org, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, David Hildenbrand <david@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Zhenwei Pi <pizhenwei@bytedance.com>, Fam Zheng <fam@euphon.net>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Peter Xu <peterx@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org> Subject: [PATCH v3 10/10] qdev: Inline machine_containers[] in qemu_create_machine_containers() Date: Thu, 2 Jan 2025 16:12:44 +0100 Message-ID: <20250102151244.59357-11-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
QOM: container_get() removal
|
expand
|
diff --git a/system/vl.c b/system/vl.c index 933ad83a935..58e68b98d87 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2114,17 +2114,15 @@ static void parse_memory_options(void) loc_pop(&loc); } -static const char *const machine_containers[] = { - "unattached", - "peripheral", - "peripheral-anon" -}; - static void qemu_create_machine_containers(Object *machine) { - int i; + static const char *const machine_containers[] = { + "unattached", + "peripheral", + "peripheral-anon" + }; - for (i = 0; i < ARRAY_SIZE(machine_containers); i++) { + for (unsigned i = 0; i < ARRAY_SIZE(machine_containers); i++) { object_property_add_new_container(machine, machine_containers[i]); } }
Only qemu_create_machine_containers() uses the machine_containers[] array, restrict the scope to this single user. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- system/vl.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)