Skip to contentSkip to conversation

Remove un-needed code

PATCH In review Bruce Rogers 2 participants 3 messages Apr 9, 2010 – Apr 12, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove un-needed code

The set_geometry_hint call below is not needed - it's just setting what was just read.

hw/virtio-blk.c +0 -0
index 9915840..bc4fa77 100644
@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c

onf)

     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);
#1 lore raw

Am 10.04.2010 00:55, schrieb Bruce Rogers:

Quoted 3 lines

The set_geometry_hint call below is not needed - it's just setting what was just read.

It needs to be "Signed-off-by" with lower-case o and b to be recognized by git, and the right angle bracket is missing.

hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c · line 494

Quoted 7 lines
hw/virtio-blk.c +0 -0
index 9915840..bc4fa77 100644
@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c
 onf)

Patch is incorrectly wrapped here.

hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *c · line 499

Quoted 6 lines
hw/virtio-blk.c +0 -1
     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

#2 lore raw
Quoted 25 lines · Kevin Wolf

Am 10.04.2010 00:55, schrieb Bruce Rogers:

Quoted 1 line

The set_geometry_hint call below is not needed - it's just setting what was

just read.

Quoted 2 lines

It needs to be "Signed-off-by" with lower-case o and b to be recognized by git, and the right angle bracket is missing.

hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf

Quoted 6 lines
hw/virtio-blk.c +0 -0
index 9915840..bc4fa77 100644
@@ -494,7 +494,6 @@ VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf 

*c

hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf · line 494

Quoted 1 line
hw/virtio-blk.c +0 -0
 onf)

Patch is incorrectly wrapped here.

Quoted 5 lines
hw/virtio-blk.c +0 -1
     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);
 
Quoted 6 lines

hw/virtio-blk.c VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf · line 499

Quoted 1 line
hw/virtio-blk.c +0 -0
     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

I've re-posted with these items fixed. Thanks.
Bruce