From nobody Thu Nov 6 01:11:10 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538298142843232.19845795863398; Sun, 30 Sep 2018 02:02:22 -0700 (PDT) Received: from localhost ([::1]:54492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6XcL-0006mt-Po for importer@patchew.org; Sun, 30 Sep 2018 05:02:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6WsI-0003Bt-Sg for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6WsC-0001HX-3W for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:43 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43543) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6WsB-0001Ey-Lg for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:39 -0400 Received: by mail-wr1-x443.google.com with SMTP id n1-v6so331818wrt.10 for ; Sun, 30 Sep 2018 01:14:38 -0700 (PDT) Received: from 640k.lan (94-36-187-248.adsl-ull.clienti.tiscali.it. [94.36.187.248]) by smtp.gmail.com with ESMTPSA id u76-v6sm11369194wmd.10.2018.09.30.01.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 01:14:37 -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; bh=U3OKt6hI7/yB7/5o6VHwnzl7wloM7tC5itIujJtuUXo=; b=K4Al/ApaQldf3te6T8iQVDlFWhW676OqyAKvnpZW/EqlnARnzktfgBq6ph69U+T7F6 o0hS6gS8LSwjFjXwhAInXjCrBc//XQyZjEST4KW+CyoHrU4AOaStWHtU5ArC07RUXdBs 8iSw2KN9IRfOW5anG5zOo9oBtf2KqBH218Bkz5aLIYCzLFsOce0eCdco7lh0kXQxLz8C ZTdgfyd4bjBE9+l/IU05Eu+SVwJKM2g3xSzf9PpJJcewZR+KpaJ4ea9fJD4i89/Rv8jV kqMm+w7sWrxkzMvDfZqz/GTskE8VDQ0xFvSDP4qzdBhxudFAIYuATlmj+lsI/yPIaQ5D 9xQQ== 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; bh=U3OKt6hI7/yB7/5o6VHwnzl7wloM7tC5itIujJtuUXo=; b=kO74H1eNH86ZqT5sUMbKSnZ8lb27b8kO33p9qqqqDG6xenkvkc1mURfzkSpEnS/Nm0 blJpMHRSihrC+HRoMvdzqZF2oILbzSGlBDxSp3eLTN7jCydIOESv5pRB4uqjPXBhMXHs 8wBGUtYQrSiXLbsBlh0HBJa7jcP+TMU1rSJG0W8iCNum5SKTIezSoqVWkDb8zH4IfMsH 6QzNs+RLN19xrvpY465PDV9KXCJQWCBGYDDkF7uJZogHhhlXrM/fY362Sl+qb2b/osZz uNGYrA5TcBnNxcr8ij12TOOw+ewOI2hS8L49TJNSsD+5mmF0T5q4jXywiyuiY/EtG5hv L0ig== X-Gm-Message-State: ABuFfoii99QNeGEsomwouKOC0CzWN+XEIGkRZA1eq1SjwR0bslEiT4Xj xlnQgfe8YYKzifSzPM5cJ4cRi+XJ X-Google-Smtp-Source: ACcGV61AsWZCsyyXheSQ9w/ou/UOEWTyRxbynM9Q6r72/uq/uGtLz8iozhIVGG1iBlat2PYyL3bz2A== X-Received: by 2002:adf:9bcf:: with SMTP id e15-v6mr3524178wrc.240.1538295277727; Sun, 30 Sep 2018 01:14:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sun, 30 Sep 2018 10:13:14 +0200 Message-Id: <1538295197-23704-77-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> References: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PULL 76/79] hw/nvram/fw_cfg: Use memberwise copy of MemoryRegionOps struct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Peter Maydell We've now removed the 'old_mmio' member from MemoryRegionOps, so we can perform the copy as a simple struct copy rather than having to do it via a memberwise copy. Signed-off-by: Peter Maydell Message-Id: <20180824170422.5783-3-peter.maydell@linaro.org> Based-on: <20180802174042.29234-1-peter.maydell@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/nvram/fw_cfg.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 6de7809..946f765 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1115,12 +1115,7 @@ static void fw_cfg_mem_realize(DeviceState *dev, Err= or **errp) sysbus_init_mmio(sbd, &s->ctl_iomem); =20 if (s->data_width > data_ops->valid.max_access_size) { - /* memberwise copy because the "old_mmio" member is const */ - s->wide_data_ops.read =3D data_ops->read; - s->wide_data_ops.write =3D data_ops->write; - s->wide_data_ops.endianness =3D data_ops->endianness; - s->wide_data_ops.valid =3D data_ops->valid; - s->wide_data_ops.impl =3D data_ops->impl; + s->wide_data_ops =3D *data_ops; =20 s->wide_data_ops.valid.max_access_size =3D s->data_width; s->wide_data_ops.impl.max_access_size =3D s->data_width; --=20 1.8.3.1