Received: from eggs.gnu.org ([2001:4830:134:3::10]:45542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuJ5R-0000WD-9t for qemu-devel@nongnu.org; Fri, 28 Nov 2014 05:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuJ5L-0003E1-3N for qemu-devel@nongnu.org; Fri, 28 Nov 2014 05:47:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuJ5K-0003Dv-Qp for qemu-devel@nongnu.org; Fri, 28 Nov 2014 05:47:35 -0500 From: Markus Armbruster References: <546C8161.10100@de.ibm.com> <1416405716-21624-1-git-send-email-tumanova@linux.vnet.ibm.com> Date: Fri, 28 Nov 2014 11:47:25 +0100 In-Reply-To: <1416405716-21624-1-git-send-email-tumanova@linux.vnet.ibm.com> (Ekaterina Tumanova's message of "Wed, 19 Nov 2014 15:01:56 +0100") Message-ID: <87iohza9fm.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] geometry: fix i386 compilation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ekaterina Tumanova Cc: kwolf@redhat.com, borntraeger@de.ibm.com, Public KVM Mailing List , mihajlov@linux.vnet.ibm.com, dahi@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com Ekaterina Tumanova writes: > Signed-off-by: Ekaterina Tumanova > --- > hw/block/hd-geometry.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c > index b462225..905d2c6 100644 > --- a/hw/block/hd-geometry.c > +++ b/hw/block/hd-geometry.c > @@ -147,7 +147,8 @@ void hd_geometry_guess(BlockBackend *blk, > uint32_t *pcyls, uint32_t *pheads, uint32_t *psecs, > int *ptrans) > { > - int cylinders, heads, secs, translation; > + uint32_t cylinders, heads, secs; > + int translation = BIOS_ATA_TRANSLATION_NONE; > struct ProbeGeometry geometry = blk_probe_geometry(blk); > > if (geometry.rc == 0) { > @@ -173,9 +174,6 @@ void hd_geometry_guess(BlockBackend *blk, > *pcyls = cylinders; > *pheads = heads; > *psecs = secs; > - /* disable any translation to be in sync with > - the logical geometry */ > - translation = BIOS_ATA_TRANSLATION_NONE; > } Actually broken in PATCH 5, so it needs to be fixed there, and not in PATCH 6 (which this one fixes up). Moreover, your fixup makes the code less clear. Please add the missing translation = ... instead. > done: > if (ptrans) {