From patchwork Mon May 23 15:09:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9132047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4CB51607D5 for ; Mon, 23 May 2016 15:24:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EE682822F for ; Mon, 23 May 2016 15:24:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E4E028237; Mon, 23 May 2016 15:24:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id A92F128091 for ; Mon, 23 May 2016 15:24:32 +0000 (UTC) Received: from localhost ([::1]:48867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4riZ-00063f-OA for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 May 2016 11:24:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUr-0002Et-Vu for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rUl-00045Z-GX for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:20 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUl-00045Q-9D for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:15 -0400 Received: by mail-wm0-x242.google.com with SMTP id n129so16052155wmn.1 for ; Mon, 23 May 2016 08:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ir6z40S/Eaaud1maNtPXMMeUl9tbjM10iW61prJz/+w=; b=QIyqdBxk+ph0GPfweszb1hrzwn764QpqcgrL6brNSPX0gvGZsByPkpFDDhHnWGpmd6 dJodHMWu+EVZGncXVzdT7tpY9Rcqtg8e8ucp3zS2kDSXLJvlSZl71GNs7Itm1K9ict1g T+Ho0P9RDZJpqMArQ3W8c6kJV/V22PlXdZQumkSb4aAO1cFTVFqW/HoBG8m2sp7xz2yX wEAyx4t+lqyAZzmxNkVMhW/9XcFemiVgcWyasNN/IwOxaoKVatn97fMR4GAPvZpilpxf 6ebkzD1ohFb234eYnKkjrBLgjXNlpj2Uqcy75cHFBnIc2ZDHZoDr9n0F2tb5sw/scqki Vgmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ir6z40S/Eaaud1maNtPXMMeUl9tbjM10iW61prJz/+w=; b=POintSC5z/SJNI3yibPkUVRfuJruinearlGwTFjKiIlEPjXY5MHsAve+ocsWlxAoLn fn3OYTq5T2Nn0zSN+4t3h0X3QcNL/zsOjTG3TLA2ODAg4eihKg2NzC0D34hnDcnGqdGa zPztDDc8pAzNR9c5478TchNZv+SG4ajoswYgMgGVlGdQhu0ZKaRd3GxOMRFlJ3+bn8bU RhsqXN+ycjbM1PEy3ueBPQth4mj8rFHtEUSRXb+1t/lBZ8cRDyPrY3PNjYOiE50K/0z3 Me5k2+nL6BQ7wvePuI0FvR2Yh1xuDoK11OOsgDi1gl/m3fcMIHQotAXiSw1d3nbVx2a+ MoxA== X-Gm-Message-State: AOPr4FXNvvJiVMa6X5y6USKMSuHwu29Is3i+kK6d7KEGKRjwfdmx9LKqprmIe+XOqp98Gg== X-Received: by 10.194.117.132 with SMTP id ke4mr14559798wjb.111.1464016214775; Mon, 23 May 2016 08:10:14 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id ac2sm19250359wjc.35.2016.05.23.08.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 08:10:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 23 May 2016 17:09:47 +0200 Message-Id: <1464016199-43768-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> References: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 12/24] memory: Drop FlatRange.romd_mode 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: Fam Zheng Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Fam Zheng 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 Message-Id: <1458900629-2334-3-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini --- memory.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/memory.c b/memory.c index ac5236b..9d00dc5 100644 --- a/memory.c +++ b/memory.c @@ -227,7 +227,6 @@ struct FlatRange { hwaddr offset_in_region; AddrRange addr; uint8_t dirty_log_mask; - bool romd_mode; bool readonly; }; @@ -252,7 +251,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; } @@ -312,7 +310,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; } @@ -666,7 +663,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. */