From nobody Tue Nov 18 07:41:54 2025 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=1608069532; cv=none; d=zohomail.com; s=zohoarc; b=YHxxmsfJHfCryMVAnd193EhGXvqhcmfeCfEwykK+ps8+wstlki5xiIs3QXsQrKDpa7LDtvgHGrBmDk1qTv67rS6sCL+PGiR0lYlIed6J6fvzM9aCAx61/cv1ZPLaLceeYviVIdxjpLjMYhSiTIqlB6i9qkrVEgclzllWdifdlqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608069532; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uGwQL6mnSIoot0h7+uDzWrDZcfWiHQRtUbTu98yN/Ks=; b=GmAgDtK+g6AwElmbe/vVcr9i1qwibTY0gkwFs+4SItQZ5udggXpTNLHuNdbowOfynsrHPHbO42z+Cfa7eFgKGmMY+gYaKKgtO949WXh/YccrUIqaMzkCLv7a58PgHuDUZlW4b8pa58aPchjVibahiKpssGkDanHfHfsYAKY3+zQ= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608069532957307.67909202045826; Tue, 15 Dec 2020 13:58:52 -0800 (PST) Received: from localhost ([::1]:36658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpElz-0007T2-Rg for importer@patchew.org; Tue, 15 Dec 2020 13:10:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpEXX-0003I2-21 for qemu-devel@nongnu.org; Tue, 15 Dec 2020 12:55:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpEXN-0001WG-Pp for qemu-devel@nongnu.org; Tue, 15 Dec 2020 12:55:10 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-vsjlM_-8NCCRfNCr5qpQWg-1; Tue, 15 Dec 2020 12:54:59 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 40FE3800D55 for ; Tue, 15 Dec 2020 17:54:58 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EF125C1C4 for ; Tue, 15 Dec 2020 17:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608054901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uGwQL6mnSIoot0h7+uDzWrDZcfWiHQRtUbTu98yN/Ks=; b=Uz58RtOzxvZsoysjTEIcqWqy8ZCin+Qvn6vVBVMUHT0YT5arCkjcxOdZYlUy5q97Rn6J4z W5xC8FCsBlqIB97IzPMEMJDZpExclJLv1vUjNKTKi+B/BfrFilg8iLj5GgNO/LiiONk/Tb H5g1BhUV1I4lo1dd3FORyisXxNPeWk0= X-MC-Unique: vsjlM_-8NCCRfNCr5qpQWg-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/45] vl: rename local variable in configure_accelerators Date: Tue, 15 Dec 2020 12:54:29 -0500 Message-Id: <20201215175445.1272776-30-pbonzini@redhat.com> In-Reply-To: <20201215175445.1272776-1-pbonzini@redhat.com> References: <20201215175445.1272776-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, 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_H4=0.001, RCVD_IN_MSPIKE_WL=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.23 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" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Silly patch extracted from the next one, which is already big enough. Because there are already local variables named "accel", we will name the global vl.c variable for "-M accel" accelerators instead. Rename it already in configure_accelerators to be ready. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index c56e6dc0b3..0ed5c5ba93 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2159,17 +2159,17 @@ static int do_configure_accelerator(void *opaque, Q= emuOpts *opts, Error **errp) =20 static void configure_accelerators(const char *progname) { - const char *accel; + const char *accelerators; bool init_failed =3D false; =20 qemu_opts_foreach(qemu_find_opts("icount"), do_configure_icount, NULL, &error_fatal); =20 - accel =3D qemu_opt_get(qemu_get_machine_opts(), "accel"); + accelerators =3D qemu_opt_get(qemu_get_machine_opts(), "accel"); if (QTAILQ_EMPTY(&qemu_accel_opts.head)) { char **accel_list, **tmp; =20 - if (accel =3D=3D NULL) { + if (accelerators =3D=3D NULL) { /* Select the default accelerator */ bool have_tcg =3D accel_find("tcg"); bool have_kvm =3D accel_find("kvm"); @@ -2177,21 +2177,21 @@ static void configure_accelerators(const char *prog= name) if (have_tcg && have_kvm) { if (g_str_has_suffix(progname, "kvm")) { /* If the program name ends with "kvm", we prefer KVM = */ - accel =3D "kvm:tcg"; + accelerators =3D "kvm:tcg"; } else { - accel =3D "tcg:kvm"; + accelerators =3D "tcg:kvm"; } } else if (have_kvm) { - accel =3D "kvm"; + accelerators =3D "kvm"; } else if (have_tcg) { - accel =3D "tcg"; + accelerators =3D "tcg"; } else { error_report("No accelerator selected and" " no default accelerator available"); exit(1); } } - accel_list =3D g_strsplit(accel, ":", 0); + accel_list =3D g_strsplit(accelerators, ":", 0); =20 for (tmp =3D accel_list; *tmp; tmp++) { /* @@ -2207,7 +2207,7 @@ static void configure_accelerators(const char *progna= me) } g_strfreev(accel_list); } else { - if (accel !=3D NULL) { + if (accelerators !=3D NULL) { error_report("The -accel and \"-machine accel=3D\" options are= incompatible"); exit(1); } --=20 2.26.2