From patchwork Fri Mar 25 10:10:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 8669371 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 32B5EC0553 for ; Fri, 25 Mar 2016 10:19:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AF8820357 for ; Fri, 25 Mar 2016 10:19:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5AB820222 for ; Fri, 25 Mar 2016 10:19:03 +0000 (UTC) Received: from localhost ([::1]:55285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajOpb-0003Up-74 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 25 Mar 2016 06:19:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajOpT-0003Uj-UF for qemu-devel@nongnu.org; Fri, 25 Mar 2016 06:18:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajOpP-0004Rz-RS for qemu-devel@nongnu.org; Fri, 25 Mar 2016 06:18:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajOpP-0004Rk-MW for qemu-devel@nongnu.org; Fri, 25 Mar 2016 06:18:51 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 538EB711E2 for ; Fri, 25 Mar 2016 10:18:51 +0000 (UTC) Received: from fam-t430.redhat.com (vpn1-7-157.pek2.redhat.com [10.72.7.157]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2PAAU3s003053; Fri, 25 Mar 2016 06:10:34 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 25 Mar 2016 18:10:29 +0800 Message-Id: <1458900629-2334-3-git-send-email-famz@redhat.com> In-Reply-To: <1458900629-2334-1-git-send-email-famz@redhat.com> References: <1458900629-2334-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 25 Mar 2016 10:18:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: Paolo Bonzini Subject: [Qemu-devel] [PATCH 2/2] memory: Drop FlatRange.romd_mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Its value is alway set to mr->romd_mode, so the removed comparisons are fully superseded by "a->mr == b->mr". Signed-off-by: Fam Zheng Reported-by: Drew Jones Tested-by: Drew Jones --- memory.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/memory.c b/memory.c index d5b75f2..26af83f 100644 --- a/memory.c +++ b/memory.c @@ -224,7 +224,6 @@ struct FlatRange { hwaddr offset_in_region; AddrRange addr; uint8_t dirty_log_mask; - bool romd_mode; bool readonly; }; @@ -249,7 +248,6 @@ static bool flatrange_equal(FlatRange *a, FlatRange *b) return a->mr == b->mr && addrrange_equal(a->addr, b->addr) && a->offset_in_region == b->offset_in_region - && a->romd_mode == b->romd_mode && a->readonly == b->readonly; } @@ -309,7 +307,6 @@ static bool can_merge(FlatRange *r1, FlatRange *r2) r1->addr.size), int128_make64(r2->offset_in_region)) && r1->dirty_log_mask == r2->dirty_log_mask - && r1->romd_mode == r2->romd_mode && r1->readonly == r2->readonly; } @@ -663,7 +660,6 @@ static void render_memory_region(FlatView *view, fr.mr = mr; fr.dirty_log_mask = memory_region_get_dirty_log_mask(mr); - fr.romd_mode = mr->romd_mode; fr.readonly = readonly; /* Render the region itself into any gaps left by the current view. */