From nobody Wed Nov 12 07:03:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568649087; cv=none; d=zoho.com; s=zohoarc; b=oQY87FsshQwNmCTvY6lGQT4xf4vOM9Vid+LUz0HU4WxLVzAj9OwS9OdeeEpd//ZiZ/dQy9/mrLhz2/c0jtosVdyx+BsBPeEnccuWS9fcX6vcqx7lCQoIUR8RQxVe7/jIpVmmVaPYa9NYSA3HmoBu+bjVKyhpfb0h79SL9G048HQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568649087; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=Clgbn8VC1npnngFnwGDRl9+7yey7IgZd01g1UbgiZRo=; b=IOOc0nB5AgTCcOoKSyNQWMXcUUbXfdvuJaOiWFMIGKLixS1nAgMIdickR9SSMKvkt61xmwlyk8A7n7BhFhSLNzn1M06PUbnhhCfB88kkMiNSb/YmyneR9eYvl54gCcDw1/o3YgVSBGFnsprtctkUWKu4oTlZ1WMK5jTI2t9H65Y= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 156864908774437.59630392453107; Mon, 16 Sep 2019 08:51:27 -0700 (PDT) Received: from localhost ([::1]:36216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9tHi-00014y-9k for importer@patchew.org; Mon, 16 Sep 2019 11:51:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53773) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9sD3-0006d8-Dq for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9sD2-0007WR-1W for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:33 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:34102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9sD1-0007WA-Nd for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:31 -0400 Received: by mail-wr1-x434.google.com with SMTP id a11so29423730wrx.1 for ; Mon, 16 Sep 2019 07:42:31 -0700 (PDT) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id i14sm17024298wra.78.2019.09.16.07.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 07:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Clgbn8VC1npnngFnwGDRl9+7yey7IgZd01g1UbgiZRo=; b=aDjFmcOMH5mA7YsMiJ3BFlA9SMqxaVialQRmvoWCb/BgOe+uT8H52C++ZFVrbnJKgg wdHdGutf/hlHeHVx5/ZX+0TFIrtcZjMWNyjPJbqSIOL9VI1H6jopvuadUGjMVZNOpYcw BAp/izoBIMLN/gWsifaNk+6ArreO8c9yR8x+dAWrellpRYqsze4zEza8rBVHNBZG5w0t IlYlZH1hUIn7UCbisXvE1vq0xeqC4sk1iVM5tvlvx5jC7RsU6AIdHy3V4EtUwYLK9ZlU wT74mGJyK4EM3TRMrSroFgGNrxVpQ0otUoT4RJJmc0wal4cw7AzaCYkpe2G0WDA7FC0l ht2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Clgbn8VC1npnngFnwGDRl9+7yey7IgZd01g1UbgiZRo=; b=Hy8v8ukG2tCys2lOJC9nUQQE+PQk+SwbM1r3URsLhl+AflG5LpxWm0ihODJ6a8NQui IZIINjl8f4QDUByoL/VZv0tna11ovVk9Td5E8zgebWvHwBx+uluHBHtk6w22YhoW6Qsr P5O++0wwyjT25gXkFCQkqze5QyL1j6IrqVIb9OpGntnjz0ouZpxXZQqbVndDUrsgpwK6 NR/lBy0V+FYsYCS+nWhHu+3KABWiXFJoJJbthGgIXNulMGJWPk2RKrSe+Ad0FOHo8YGv Fx4OyeOXDChIL6FwMXZZUNsC/YHfBr4c18CC3XBqM6mISPasbpf9eLheuaCqzKZwxKv3 BjAA== X-Gm-Message-State: APjAAAV4SLqrAU28TZ5F1l8BToYaEZRePjTp69KQgNG6zAGTvutrVRwt UQ6xWs7V9rqnvvRVNd4/aCOOZ7E4 X-Google-Smtp-Source: APXvYqywElG9yC3S3GoKxj3QMAgxr7mwz425mWj6dg96HevMBsy5VrqFN95i+lS08Vy4yMSwsYrgqg== X-Received: by 2002:adf:df91:: with SMTP id z17mr126630wrl.116.1568644950397; Mon, 16 Sep 2019 07:42:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 16 Sep 2019 16:41:57 +0200 Message-Id: <1568644929-9124-18-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568644929-9124-1-git-send-email-pbonzini@redhat.com> References: <1568644929-9124-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 Subject: [Qemu-devel] [PULL 17/29] hw/i386/pc: Use address_space_memory in place 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: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The address_space_memory variable is used once. Use it in place and remove the argument. Suggested-by: Samuel Ortiz Reviewed-by: Li Qiang Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190818225414.22590-4-philmd@redhat.com> --- hw/i386/pc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 81e5a59..dd5ec2e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -936,7 +936,7 @@ static void pc_build_smbios(PCMachineState *pcms) } } =20 -static FWCfgState *bochs_bios_init(AddressSpace *as, PCMachineState *pcms) +static FWCfgState *bochs_bios_init(PCMachineState *pcms) { FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; @@ -946,7 +946,8 @@ static FWCfgState *bochs_bios_init(AddressSpace *as, PC= MachineState *pcms) MachineState *ms =3D MACHINE(pcms); int nb_numa_nodes =3D ms->numa_state->num_nodes; =20 - fw_cfg =3D fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, as); + fw_cfg =3D fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, + &address_space_memory); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, pcms->boot_cpus); =20 /* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86: @@ -1868,7 +1869,7 @@ void pc_memory_init(PCMachineState *pcms, option_rom_mr, 1); =20 - fw_cfg =3D bochs_bios_init(&address_space_memory, pcms); + fw_cfg =3D bochs_bios_init(pcms); =20 rom_set_fw(fw_cfg); =20 --=20 1.8.3.1