Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299286
b: refs/heads/master
c: 1a87228
h: refs/heads/master
v: v3
  • Loading branch information
David Gibson authored and Michael S. Tsirkin committed Apr 15, 2012
1 parent d10f42f commit e78710b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0aa3e0916d7e531e69b02e426f7162dfb1c6c0f
refs/heads/master: 1a87228f5f1d316002c7c161316f5524592be766
7 changes: 5 additions & 2 deletions trunk/drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,14 @@ static void virtballoon_changed(struct virtio_device *vdev)

static inline s64 towards_target(struct virtio_balloon *vb)
{
u32 v;
__le32 v;
s64 target;

vb->vdev->config->get(vb->vdev,
offsetof(struct virtio_balloon_config, num_pages),
&v, sizeof(v));
return (s64)v - vb->num_pages;
target = le32_to_cpu(v);
return target - vb->num_pages;
}

static void update_balloon_size(struct virtio_balloon *vb)
Expand Down

0 comments on commit e78710b

Please sign in to comment.