diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2008-05-29 05:08:01 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-30 01:09:45 -0400 |
commit | 7f31fe05000af54e1af81f65a96cab90db8d7ed8 (patch) | |
tree | 41de5ae1cad5bc30f18bc3334104d059f5c83fc3 /include | |
parent | 52a3a05f3ab82655ffa4c9bf6835565c98a3c2e5 (diff) |
virtio_config: fix len calculation of config elements
Rusty,
This patch is a prereq for the virtio_blk blocksize patch, please apply it
first.
Adding an u32 value to the virtio_blk_config unconvered a small bug the config
space defintions:
v is a pointer, to we have to use sizeof(*v) instead of sizeof(v).
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/virtio_config.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 50db245c81ad..71d6c102497e 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -99,7 +99,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
99 | * The return value is -ENOENT if the feature doesn't exist. Otherwise | 99 | * The return value is -ENOENT if the feature doesn't exist. Otherwise |
100 | * the config value is copied into whatever is pointed to by v. */ | 100 | * the config value is copied into whatever is pointed to by v. */ |
101 | #define virtio_config_val(vdev, fbit, offset, v) \ | 101 | #define virtio_config_val(vdev, fbit, offset, v) \ |
102 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) | 102 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) |
103 | 103 | ||
104 | static inline int virtio_config_buf(struct virtio_device *vdev, | 104 | static inline int virtio_config_buf(struct virtio_device *vdev, |
105 | unsigned int fbit, | 105 | unsigned int fbit, |