From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org
Subject: [PATCH] virtio_config: fix len calculation of config elements
Date: Thu, 29 May 2008 11:08:01 +0200 [thread overview]
Message-ID: <200805291108.01604.borntraeger@de.ibm.com> (raw)
In-Reply-To: <20080529083004.GQ25504@kernel.dk>
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>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kvm/include/linux/virtio_config.h
===================================================================
--- kvm.orig/include/linux/virtio_config.h
+++ kvm/include/linux/virtio_config.h
@@ -99,7 +99,7 @@ static inline bool virtio_has_feature(co
* The return value is -ENOENT if the feature doesn't exist. Otherwise
* the config value is copied into whatever is pointed to by v. */
#define virtio_config_val(vdev, fbit, offset, v) \
- virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v))
+ virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v))
static inline int virtio_config_buf(struct virtio_device *vdev,
unsigned int fbit,
next prev parent reply other threads:[~2008-05-29 9:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 9:04 [PATCH/RFC] virtio_blk: check for hardsector size from host Christian Borntraeger
2008-05-29 8:04 ` Rusty Russell
2008-05-29 8:11 ` Christian Borntraeger
2008-05-29 8:12 ` Jens Axboe
2008-05-29 8:13 ` Jens Axboe
2008-05-29 8:27 ` Christian Borntraeger
2008-05-29 8:30 ` Jens Axboe
2008-05-29 9:08 ` Christian Borntraeger [this message]
2008-05-30 3:18 ` [PATCH] virtio_config: fix len calculation of config elements Rusty Russell
2008-05-29 9:08 ` [PATCH v2] virtio_blk: check for hardsector size from host Christian Borntraeger
2008-05-30 3:41 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805291108.01604.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox