From patchwork Sun Mar 23 22:40:35 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: 875641 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f4c:0:b0:38f:210b:807b with SMTP id cm12csp1881174wrb; Sun, 23 Mar 2025 15:42:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWHt+Cqf54c2pIUkPJCqO08gMgUBu6pxh7ZfF9S4cpk7ISOj2XrGfljnLt6Xvem1whSNWcBRQ==@linaro.org X-Google-Smtp-Source: AGHT+IHPaxJoYEqzeuFcjGWwlE4i3uEGxJiV7jwksn2/DZCfDGGS9JmkxIO3nl35g9h4ZU8k6auQ X-Received: by 2002:a05:620a:29d1:b0:7c5:9c12:fc8 with SMTP id af79cd13be357-7c5ba21143dmr1367849685a.38.1742769752823; Sun, 23 Mar 2025 15:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742769752; cv=none; d=google.com; s=arc-20240605; b=LEzp4iomQDjGQmtOpcByJbDRir8aKVLxLtN07merDgUfCr3fy+WaVZAawDIb5Ql1eL +ewXPz10CAd9GZdFYGkqrttPzYFKmZJOWny8UirRldAPD10KwY5aIFLEigoRbvhqfQP+ 8UfNHNgq7CB4FxzGNEr1t4KZHHmjS8O30FX5lgFa8QT9ARKBNV7kD+u8tbF1AcoBj/bh 0x0wJCyJkiyQaRezdaadExjpvCHugYXq6mANcwUx/3IbK7LAlQli3lcs7RLl2DE9xZ65 O2b8sIvWHvUaVuIT6PrJCCn2sxyR+NIFC7zhqiFRa70oktJpEBuPhZ7fH2RlfE9rdJkf LBUQ== 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=dCQIZKUBzJuxBIof22dcIv0mCLqdpttz0aPD7GjZTzg=; fh=fS/4rnnLwcRgvOOCJ1cvfiQufE+14bwOLEAj2Zueb4I=; b=S1J5xo3y1CEJg8wB97pGExuoZZsytJ6uE0senp4mB5KyEitGMn9R7+VxTCbuuez3bu c94yLxU6RURZJQ9O4yNllJl4DeWO8AvAAiKYHNQCHlf8cB5mMq3jsv/RWGSoGMsNG9dz VF0QsE8jZNBIA/CVJ/DeQpmj/2z+cgu72+3MjYKBAV36r6Jf5eG/4v8lSfvGixTWh4OI R5DRlwEWpVQEDUYg/hvFS6YG+9z0ksrjeyKNE5F+0pqEqAQBHsUm9VCubdDrcb+4fU9d b0JzK78nwA23yprqVjSZKWowarKdhRYfkD90BfF+yPbybnN92NgdCyGaD8aJWjoE5VdG tU2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VJG5IBZJ; 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-7c5b9356153si650206985a.410.2025.03.23.15.42.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Mar 2025 15:42:32 -0700 (PDT) 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=VJG5IBZJ; 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 1twU0L-00068D-2m; Sun, 23 Mar 2025 18:41:17 -0400 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 1twU0J-00067j-Ak for qemu-devel@nongnu.org; Sun, 23 Mar 2025 18:41:15 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1twU0G-0006Ej-J6 for qemu-devel@nongnu.org; Sun, 23 Mar 2025 18:41:15 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3912e96c8e8so2080899f8f.2 for ; Sun, 23 Mar 2025 15:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742769671; x=1743374471; 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=dCQIZKUBzJuxBIof22dcIv0mCLqdpttz0aPD7GjZTzg=; b=VJG5IBZJKk3GGPK1Wuuag6zrGVAUx7K6oYY1qZX0V9UeBxfP2hLX6GrzkZ3C4AxZnr B8FzgoCfkQHAOSJmGjdxFwmjjPZcnMG6WRjVWdpjVHyva7VbM7DNGKm1T7x3l3kTihPG 1veJq/qLoK9ZEorIn8J1nFdX5aiSDKHtMHY34jPZfTExzc46DimfR3oTuWfxwLoMBWfu v2TFq4jG3jPUKtSrdpIWeOn8C4izgyXt9lzoQY0rBWWTiqRwUgsX2rPfKHMC6cR/tuTM hRKtp6+a+CaXNO9t7Hyhq7qqOrk0DPErKomCcUMjhXz4KOkKe1bbzt7NJ3K2/k3OT3v+ 4ZpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742769671; x=1743374471; 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=dCQIZKUBzJuxBIof22dcIv0mCLqdpttz0aPD7GjZTzg=; b=mbVKqPOCPs0+iXCMZLouIqj0jfIT6T19fYWO0dUs08yh8ntUfCS6RSCOIrH1H14W21 ViCKu9TRcVi+J9R6HJMI8II6q2JOgA0EToS+9X3oDHdQ7642CZTbquKiha27Ob+eIX6o R3HLYtiGvsZM8t5r2NOD1E0kZX5wu63Cfo3JzcKSE2UbRPk/0hUq/MW9t+ynb3947nXH lZGtQ6jYI2CZO/giAdoIiH+nVHU5ZEsLuEcEj57EMEG0mbCZ6XjS5E8jyU57oOAk77ym 3YTAEugOY3ztarkZirQgLVxEsvUSVH7SRwnmsyiHOqwZart1CDEb9dYLs+jlmxKDiPkH LTkw== X-Gm-Message-State: AOJu0YwkWs74+8m2P7GaWRXfk0bzEyAab78J5BKJsUQYNLIHEL+Ggx7m 0VUC/tElYhzCm/o9IkTBtfszoFFB/FWje/Yh14QGc5TznkkJv0O9hcqpXMcQl21SeUgLPPsQUjY I X-Gm-Gg: ASbGncswi+ZATX3q0fVHYg0/oChtvOZvGORhwp/2+xyCvItsWOMk5jlLOeF1mWqElyg rCmIh7r5DNSJvnvpijZHGxLCzRBtrCPzr2EL1lP/eWFYl+Ekt6lSGe7SQQ7aAdwv49jbof1EsTq IQih7MopHEHZcL5zUzEao1BnwGKdwwhxmZI32pw8+6TdvMAiXu/Su+DIXJ5jf4anPbhIZlSHKOg 27+9WrbDsKxz8UrJwGndlmhYOlnhhv8EsR5mujmRRb3C6R0o3ol55xNkLqU8TlFjlZKTeN9jRG9 se2qXeuetrA1VNWNqyhGM6rx8Wo2m3qXo/HCyYSI2WnDKiLIoPtGVuI4jjcMyqRiAXpp85mvqbX HDigqg08KAnmKyKbB3ES8SUJz X-Received: by 2002:a5d:5f8c:0:b0:390:e7c1:59d3 with SMTP id ffacd0b85a97d-3997f8ee934mr8331895f8f.2.1742769670880; Sun, 23 Mar 2025 15:41:10 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d4fdbd1c7sm102399385e9.40.2025.03.23.15.41.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 23 Mar 2025 15:41:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Artyom Tarasenko , Thomas Huth , Nicholas Piggin , qemu-ppc@nongnu.org, Zhao Liu , Richard Henderson , Pierrick Bouvier , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH-for-10.1 6/6] cpus: Remove #ifdef check on cpu_list definition Date: Sun, 23 Mar 2025 23:40:35 +0100 Message-ID: <20250323224035.34698-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250323224035.34698-1-philmd@linaro.org> References: <20250323224035.34698-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 Since we removed all definitions of cpu_list, the #ifdef check is always true. Remove it, inlining cpu_list(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- cpu-target.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 5947ca31a0a..30598619581 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -71,7 +71,6 @@ const char *parse_cpu_option(const char *cpu_option) return cpu_type; } -#ifndef cpu_list static void cpu_list_entry(gpointer data, gpointer user_data) { CPUClass *cc = CPU_CLASS(OBJECT_CLASS(data)); @@ -85,17 +84,6 @@ static void cpu_list_entry(gpointer data, gpointer user_data) } } -static void cpu_list(void) -{ - GSList *list; - - list = object_class_get_list_sorted(TYPE_CPU, false); - qemu_printf("Available CPUs:\n"); - g_slist_foreach(list, cpu_list_entry, NULL); - g_slist_free(list); -} -#endif - void list_cpus(void) { CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE)); @@ -103,7 +91,12 @@ void list_cpus(void) if (cc->list_cpus) { cc->list_cpus(); } else { - cpu_list(); + GSList *list; + + list = object_class_get_list_sorted(TYPE_CPU, false); + qemu_printf("Available CPUs:\n"); + g_slist_foreach(list, cpu_list_entry, NULL); + g_slist_free(list); } }