From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yc7g5-0005iE-Qk for qemu-devel@nongnu.org; Sun, 29 Mar 2015 03:30:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yc7g1-0003oa-VB for qemu-devel@nongnu.org; Sun, 29 Mar 2015 03:30:37 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:36942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yc7g1-0003oE-NC for qemu-devel@nongnu.org; Sun, 29 Mar 2015 03:30:33 -0400 Received: by wiaa2 with SMTP id a2so84453199wia.0 for ; Sun, 29 Mar 2015 00:30:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5517AA14.20001@redhat.com> Date: Sun, 29 Mar 2015 09:30:28 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1427391520-29497-1-git-send-email-pbonzini@redhat.com> <1427391520-29497-2-git-send-email-pbonzini@redhat.com> <20150328195615-mutt-send-email-mst@redhat.com> In-Reply-To: <20150328195615-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/22] memory: add memory_region_ram_resize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 28/03/2015 19:58, Michael S. Tsirkin wrote: >> > +void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp) >> > +{ >> > + assert(mr->terminates); > Why? Does "terminates" guarantee that ram_addr > is valid? In any case, I think this needs a comment. More or less, but not really; I was just cutting/pasting it from other functions that use ram_addr. I will clean it up. Paolo