From patchwork Sun Sep 30 08:13:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 147857 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2666778lji; Sun, 30 Sep 2018 02:02:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61FVIPWS+Sm+x9TSspbZjKxPzIiX7DyhTcPeGYBKPnOlB/91p1lSLqx5Yd7YzrwAhwZxDSt X-Received: by 2002:a37:b101:: with SMTP id a1-v6mr4425638qkf.222.1538298175943; Sun, 30 Sep 2018 02:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538298175; cv=none; d=google.com; s=arc-20160816; b=siYTnupfA/jsLxZclxNxjLg/cEBPSiZPNkOZwshPRUKO9rqEmRwWMAnEgPg335aT+X SAz7vR0dxrvBL95KnkkuxGALLm2VP1KJL9YBMvQfPDqC7pWlmcajgXaklYmd0mopVlVC WjegZ17VQtxb+YVBS/86L8gKEfHFCJGnk3XCTcjFw0/4DUGk8FOPAK5LUvaJxC8vtUd4 jTObvRrgP88n9zJQKyjHjuJROKHnDQ+BJ12vtkK3CH02PCxWUY38kWqDGMLwUPswzg6q FIK9gNSXXlNo+gEMnga/kfzTuoFl4CExpAYXCwmXDB92aNseTmocY7kaQJHs2pwHVRVa t8lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=U3OKt6hI7/yB7/5o6VHwnzl7wloM7tC5itIujJtuUXo=; b=OtsH81S0X8xNEO+3pNQNXxwXZayoCj1QEaFH4D9K4MXDzZfL+YF5uTjD9rEewt/FuT mTvN9qRLF6AFavJM691bF4vHbPJRUR+F9o65f9Dwgp9+LqMRQI7tIzfqPzMquhEs/l9d pRLHbRHSORPUAMbVsbxoBF0e7ejJfLYe6Fy+C8aTUBjuRs2A9pPpiYlQ+w1MAd/mk3UY bDpqE1ne3YOmp1/cAF2LMo7yUFY7USdg2hM0p/3RakpWtSzz4qpe5ZmpvE7X3ZEQ+/wN I5c3bB1VoFDkiy0AqYUbMTGpQvLb19csPdgOtvQQky3r2gtoQ0IRnnNjkROCryOfUxZL hsZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="K4Al/Apa"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j9-v6si1171718qvi.159.2018.09.30.02.02.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 30 Sep 2018 02:02:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="K4Al/Apa"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:54497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6Xct-0008DF-EO for patch@linaro.org; Sun, 30 Sep 2018 05:02:55 -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) 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-Received: by 2002:adf:9bcf:: with SMTP id e15-v6mr3524178wrc.240.1538295277727; Sun, 30 Sep 2018 01:14:37 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 1.8.3.1 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, Error **errp) sysbus_init_mmio(sbd, &s->ctl_iomem); if (s->data_width > data_ops->valid.max_access_size) { - /* memberwise copy because the "old_mmio" member is const */ - s->wide_data_ops.read = data_ops->read; - s->wide_data_ops.write = data_ops->write; - s->wide_data_ops.endianness = data_ops->endianness; - s->wide_data_ops.valid = data_ops->valid; - s->wide_data_ops.impl = data_ops->impl; + s->wide_data_ops = *data_ops; s->wide_data_ops.valid.max_access_size = s->data_width; s->wide_data_ops.impl.max_access_size = s->data_width;