From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1FPT-0003K7-8R for qemu-devel@nongnu.org; Mon, 12 Apr 2010 04:54:23 -0400 Received: from [140.186.70.92] (port=47579 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1FPR-0003Jh-B9 for qemu-devel@nongnu.org; Mon, 12 Apr 2010 04:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1FPP-0004HA-C2 for qemu-devel@nongnu.org; Mon, 12 Apr 2010 04:54:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17657) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1FPP-0004Gv-3J for qemu-devel@nongnu.org; Mon, 12 Apr 2010 04:54:19 -0400 Message-ID: <4BC2DF9C.4040504@redhat.com> Date: Mon, 12 Apr 2010 10:53:48 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Remove un-needed code References: <4BBF5BE50200004800092A6A@sinclair.provo.novell.com> In-Reply-To: <4BBF5BE50200004800092A6A@sinclair.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: qemu-devel@nongnu.org Am 10.04.2010 00:55, schrieb Bruce Rogers: > The set_geometry_hint call below is not needed - it's just setting what was just read. > > Signed-Off-By: Bruce Rogers > diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c > index 9915840..bc4fa77 100644 > --- a/hw/virtio-blk.c > +++ b/hw/virtio-blk.c > @@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c > onf) Patch is incorrectly wrapped here. > s->rq = NULL; > s->sector_mask = (s->conf->logical_block_size / 512) - 1; > bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs); > - bdrv_set_geometry_hint(s->bs, cylinders, heads, secs); > > s->vq = virtio_add_queue(&s->vdev, 128, virtio_blk_handle_output); bdrv_guess_geometry is not a simple getter function, but it already calls bdrv_set_geometry_hint itself, so I think the logic is correct. Kevin