From patchwork Tue May 16 12:48:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 13243112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E961DC77B7A for ; Tue, 16 May 2023 12:49:54 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyu6K-0004TR-S8; Tue, 16 May 2023 08:48:24 -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 1pyu6I-0004LJ-CC for qemu-devel@nongnu.org; Tue, 16 May 2023 08:48:22 -0400 Received: from mout.kundenserver.de ([212.227.126.135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyu6G-00063u-GB for qemu-devel@nongnu.org; Tue, 16 May 2023 08:48:22 -0400 Received: from quad ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdf3x-1qXxjb342D-00ZfC5; Tue, 16 May 2023 14:48:14 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Thomas Huth , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Laurent Vivier Subject: [PULL 5/9] linux-user/main: Use list_cpus() instead of cpu_list() Date: Tue, 16 May 2023 14:48:06 +0200 Message-Id: <20230516124810.90494-6-laurent@vivier.eu> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230516124810.90494-1-laurent@vivier.eu> References: <20230516124810.90494-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:oPBDiUyh/dXjYMGyATPj7Fk/g2VeGSfktkQFIloMdH8Po+PViqf OCM0rm89dM62xlvlx+C3t1Rajy+bFq+NgMEjjyWbRE8AryFHh/01A1K6KZkNjn3gtiVybFb th34r1tlLo/LD0R+xuvZEebyyQ1q6WOpjd9q8MPUVIGSb6OIt5jkAtUajWHl2+sQIaQRUHm 7Jzea8f82xu6Gu/8luzgg== UI-OutboundReport: notjunk:1;M01:P0:R69Mj1iWK90=;rJwe7ScUWbmHlnOE22aX50oKi3c k+8AIFvBLXh+XqxGTtiHSmeWZtLYduNdYfsR+pGtw3jvwkQSe5FYR3hiXcRXIPC+odTYVJ61+ BVVXPROMzBNX1PQ99ihv0lWxCtdchaqm6OQgBZe3kcXsdFlzGDdbwx/7EeMztTWKaMEvgXXAN GeNKrsq7S7/QQlCNy1eRUZ3Cz3i1JsiE5yhI3/qwmK21bM6sQ0KRPfKZLR7x4jNEyp5n73NPp 0/LbRTvIHezXL7FcrTohKlIkmMm8I4BfU6Ebjkzmi5eo5KcOCSj3Mw4KWIq4n4sL/Zv4RQDgZ ru0SYwSxu8xCNa9JNI02mLJ8/MetvX5Qd18ZegUsPpQhZV+xC+lvFequnsBxeofSPOtaNkYNL MnEo22GtADB52ktTfC73B9VkoIWbz7YQYP5VdrJhsI4io27Pj5vOMlLpPua5EGP6eQ/GbgFJo q8cCGFTXtQBRZuVUT/kvFfJBrm+QU9k8Gslo0xmOYaSrLo+HLmeOlexb2Ain8lmQw8rZ/0/y9 ZYIqJy6XfgT4AoMK6vEiWJC6VdKEgBMedNPtuArSPWN+wPDhEY6Kgt84Lf1lViLzdhnc10fx6 E35scS1sOwRuBHei5dZ9h3c/zdElBl5b+w3vQb+zLONvxM+MBa/yuxjRPk6mMwlnp1y1+aMqb l9Idej3AR/pFToM89AM7vC9Zo1/ZUvuzKmCR+yWs8A== Received-SPF: none client-ip=212.227.126.135; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Thomas Huth This way we can get rid of the if'deffery and the XXX comment here (it's repeated in the list_cpus() function anyway). Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230424122126.236586-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- linux-user/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index fe03293516a5..aece4d9e9119 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -359,10 +359,7 @@ static void handle_arg_cpu(const char *arg) { cpu_model = strdup(arg); if (cpu_model == NULL || is_help_option(cpu_model)) { - /* XXX: implement xxx_cpu_list for targets that still miss it */ -#if defined(cpu_list) - cpu_list(); -#endif + list_cpus(); exit(EXIT_FAILURE); } }